On Sat, Aug 27, 2011 at 08:16:50PM +0200, Dr.Ruud wrote: > I would like 'lazy' syntax like: > > <$fh> x {/^#/ or print}; > > to process a list.
When I tried your code like so: open my $fh, '<', $file or die qq(Unable to open $file: $! ); <$fh> x {/^\s*#/ or print}; close $fh or die qq(Unable to close $file: $! ); I get these errors: Useless use of repeat (x) in void context at ./test line 48. Use of uninitialized value in pattern match (m//) at ./test line 48, <$fh> line 1. Use of uninitialized value in print at ./test line 48, <$fh> line 1. Odd number of elements in anonymous hash at ./test line 48, <$fh> line 1. Out of memory! I'm using Perl 5.8.8. How can that line be used? Thanks, Mike -- Satisfied user of Linux since 1997. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/