On Aug 18, 7:56 pm, [EMAIL PROTECTED] (Merdinus) wrote: > The command that's causing this error is: > > my @refs = split('[', $references); > I also tried >>> my @refs = split("[", $references); <<< (doublle > quotes instead) > and got the same error. > If I change it to > > my @refs = split("asdfsdfas", $references); > > then I get no such error. > > The only thing I can think of is that the Perl compiler is dead wrong > here - it's treating my search string as a left bracket that needs to > be matched up. > > The Perl exe is that latest copy from ActiveState. > > Any thoughts/work arounds would be all kinds of appreciated.
Try using this instead: my @refs = split(/\[/, $references); If you use special characters inside your reg exp (& expect it not to be recognized as special) you have to escape these chars using a \ (back slash). [ bracket you are using is special to reg exp, it is used to specify a character class. For more info on reg exp special characters / options etc, visit: perldoc.perl.org/perlretut.html Regs, Viki Register for Email updates, on Perl tips & Perl tutorials: http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2119834&loc=en_US -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/