Hi,

I have a file,

 cat try.xpm
a 1
b 2
c 3
d 4

abbbcaaaadddb


I wish to use perl to translate the last line into the numerical value.

#!/usr/bin/perl

use warnings;
use strict;

open FILE, "<try.xpm" or die $!;

my @line = <FILE>;

while (<FILE>) {
        print $_;
}

strangely it print me nothing out,

Thanks for any suggestions,

Best regards,

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to