On Thu, May 27, 2010 at 12:48 PM, Robert Morales <robertmorales...@gmail.com> wrote: > Final $ should be \$ or $name at ./script.pl line 11, within string > syntax error at ./script.pl line 11, near "= "^((?!total).)*$"" > Execution of ./script.pl aborted due to compilation errors. > > It might be something with the regex, but I can't see exactly what?? ** snip ** > $regex = "^((?!total).)*$";
The problem is that Perl is interpreting the $ to mean something special (i.e., an embedded variable). You can escape it with \$, as suggested by the error message. perl -e ' use strict; use warnings; #my $regex = "^((?!total).)*$"; my $regex = "^((?!total).)*\$"; ' -- Brandon McCaig <bamcc...@gmail.com> V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. Castopulence Software <http://www.castopulence.org/> <bamcc...@castopulence.org> -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/