in reply to Re^2: while (<FP>) conditionals
in thread while (<FP>) conditionals

When typing code on the command line, you often have to escape some characters depending on your system.
For example, the error message shows that: my $s = got munged by your shell into my  = before it was passed to perl.

Replies are listed 'Best First'.
Re^4: while (<FP>) conditionals
by choroba (Cardinal) on Feb 05, 2014 at 16:26 UTC
    Another reason we should not use one-liners in replies if the OS is not specified.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^4: while (<FP>) conditionals
by jktstance (Novice) on Feb 05, 2014 at 20:28 UTC
    I escaped the two $s instances with backslashes and it worked fine. I'm still not sure why %s didn't need to be escaped. As you can probably tell, I'm not too well versed in the linux shell either...