in reply to Re: while (<FP>) conditionals
in thread while (<FP>) conditionals
All I ever got were the following errors:perl -we "my $s = qq[0\n]; printf qq[%s\n], ($s ? 'true' : 'fal +se');
However, when I put it into a script and ran it, it worked fine. Also, your second test does not work for me:syntax error at -e line 1, near "my =" Search pattern not terminated or ternary operator parsed as search pat +tern at -e line 1.
When I run it, I get the following:#! perl use strict; use warnings; local $/ = \1; for ($_ = <DATA>; $_; $_ = <DATA>) { print "<$_>\n"; } __DATA__ 1 0 42
But at this point, my question is answered. Now we're just toying around!<1> < >
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: while (<FP>) conditionals
by SuicideJunkie (Vicar) on Feb 05, 2014 at 15:31 UTC | |
by choroba (Cardinal) on Feb 05, 2014 at 16:26 UTC | |
by jktstance (Novice) on Feb 05, 2014 at 20:28 UTC | |
|
Re^3: while (<FP>) conditionals
by Athanasius (Archbishop) on Feb 05, 2014 at 16:48 UTC | |
by jktstance (Novice) on Feb 05, 2014 at 20:27 UTC |