in reply to A few things, mac addresses, file lines..
How about:
Ok, I want to match a string that can possibly go over multiple lines.
$string =~ m/.*/s This will match everything. You will have to be a little more precise.
Also, I want to print all lines between 23 and 56 (say...)
open FILE, "<$file" or "Oops Perl says $!\n"; @file = <FILE>; close FILE; print @file[22..55]; # or without glbbing in the whole file $. has line number we are at open FILE, "<$file" or "Oops Perl says $!\n"; while(<FILE>) { next if $. < 23; last if $. > 56; print; } close FILE;
Also, how about printing everything between and tags? Over multiple lines..
I suggest this as the best solution HTML::TokeParser Tutorial by crazyinsomniac
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|