in reply to Re: Re: Reading entire file.
in thread Reading entire file.
my $tool_number = 1; # (say - perhaps you're looping through them, hen +ce... $tool_number = sprintf(%02d,$tool_number); # add leading zero, if need +ed while (<PD_FILE>){ if (/^Tool$tool_number/) { $continue = 1; } if (/^Tool/ && !(/^Tool$tool_number/)) { $continue = 0; } if ($continue){ print $_; } }
FYI - ^ matches the beginning of a string (line in this case).
cLive ;-)
|
|---|