You're confusing grep() with UNIX's grep utility. check out perldoc -f grep, and you will see. You're also slurping <FILE>...
Here's another way to do it...
while( <FILE> ) { if( my $pos = index( $_, '--foo' ) ) { $pos += 5; print substr( $_, $pos, length($_) - $pos ); } }
In reply to Re: Array Search
by lestrrat
in thread Array Search
by IPstacks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |