in reply to Re: Use Perl's Sort to only sort certain lines in a file?
in thread Use Perl's Sort to only sort certain lines in a file?
sub process_file { my ($fh) = @_; while ( my $line = <$fh> ) { print $line; if ( $line =~ /section start marker/ ) { $line = handle_section($fh); redo if defined $line; } } } ... sub handle_section { ... return $line; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Use Perl's Sort to only sort certain lines in a file?
by grahambuck (Acolyte) on Jan 02, 2015 at 01:24 UTC | |
by Anonymous Monk on Jan 02, 2015 at 02:02 UTC | |
by grahambuck (Acolyte) on Jan 02, 2015 at 03:10 UTC | |
by Anonymous Monk on Jan 02, 2015 at 03:40 UTC | |
by grahambuck (Acolyte) on Jan 02, 2015 at 06:03 UTC | |
|