in reply to Line number in a file
then do:while (<FILE>) { s/^/[$.]/; $file .= $_; }
Well, that's probably what I'd do (or something like it, anyway - I'd have to see the data to decide)if(/(^\[(\d+)\](\S+)\s+(\d+)/m) { $mylist{$2} = $3; $linenumber = $1; }
|
---|