in reply to Segmenting a file &deleting control characters
Why don't you just use a regex to pick out the segment markers?seek (OUT,2,1); read (OUT, my $num,4);
Now the last bit of your last file is in $1, and the four characters to make into a filename are in $2. The start of your next file is in $3.if (/^(.*?)$delim\s\s(....)(.*)$/) {
Look into the tr/// operator for deleting control characters.
|
|---|