in reply to Re: Re: Simple Encryption question
in thread Simple Encryption question
If your file is small, just read it into an array first:
open F, $file or die $!; my @data = <F>; for my $i ( 0..$#data ) { if ( $i == 0 or $i == $#data ) { #first or last line so do whatever print $data[$i]; } else { # not first or last line $data[$i] =~ s#^(\d{16})#$_ = $1; tr/0-9/A-J/; $_#e print $data[$i]; } }
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Simple Encryption question
by rman (Initiate) on Dec 30, 2003 at 20:26 UTC | |
by tachyon (Chancellor) on Dec 30, 2003 at 22:10 UTC | |
by rman (Initiate) on Dec 31, 2003 at 19:50 UTC |