Amy Lee wrote:
> There's a file like this,
>
> ;348577;aaaaaaaaaaaaaaaaa;3454353453;asdssssssssss ss;234323;asdassssssss
> dadssdasef;ttgfhdfg
>
> I hope it can be this,
>
> 348577;aaaaaaaaaaaaaaaaa;3454353453;asdsssssssssss s;234323;asdassssssss
> dadssdasef;ttgfhdfg
>
> So my problem is how use Perl to delete the first character of the first
> line.
open my $file, '+<', 'myfile.txt' or die $!;
my @lines = <$file>;
$lines[0] = substr $lines[0], 1;
seek $file, 0, 0;
truncate $file, 0;
print $file @lines;
--
Gunnar Hjalmarsson
Email:
http://www.gunnar.cc/cgi-bin/contact.pl