Re: one liner for for and if

2008-05-08 Thread Richard Lee
Rob Dixon wrote: Richard Lee wrote: #!/usr/bin/perl use warnings; use strict; my @array = qw/one two three four/; print "$_\n" for @array last if "$_" eq q/three/; [EMAIL PROTECTED] tmp]# ./!$ ././././testthis2.pl syntax error at ././././testthis2.pl line 8, near "@array last " Execution

Re: one liner for for and if

2008-05-08 Thread Rob Dixon
Yitzchok Good wrote: > > if ("$_" eq q/three/) {print "$_\n" for @array last}; That won't even compile. Please don't publish nonsense. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: one liner for for and if

2008-05-08 Thread Rob Dixon
Richard Lee wrote: > #!/usr/bin/perl > > use warnings; > use strict; > > my @array = qw/one two three four/; > > print "$_\n" for @array last if "$_" eq q/three/; > > > [EMAIL PROTECTED] tmp]# ./!$ > ././././testthis2.pl > syntax error at ././././testthis2.pl line 8, near "@array last " > Exec

Re: one liner for for and if

2008-05-08 Thread Yitzchok Good
if ("$_" eq q/three/) {print "$_\n" for @array last}; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

one liner for for and if

2008-05-08 Thread Richard Lee
#!/usr/bin/perl use warnings; use strict; my @array = qw/one two three four/; print "$_\n" for @array last if "$_" eq q/three/; [EMAIL PROTECTED] tmp]# ./!$ ././././testthis2.pl syntax error at ././././testthis2.pl line 8, near "@array last " Execution of ././././testthis2.pl aborted due to c