Perhaps you want something like this:
my $index = 1; while ( <> ) { if ( /^SS/ ) { open OUT, '>', "$ARGV$index" or die "Cannot open '$ARGV$index' + $!"; ++$index; } print OUT; }
In reply to Re: splitting files
by jwkrahn
in thread splitting files
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |