See Inline comments
use strict;
> use warnings;
> my $fname = $ARGV[0];
> open my $RFH,'<',$fname;
>
> while (<$RFH>) {
> next unless /:/ and my %field = /(.*?):(.*?)/mg; # Wrong
>
# I would prefer doing this
chomp;
if(/^(.+?)\:(.+?)/){ $field{$1}=$2;}
}
> foreach my $key (keys %field ) {
> print "KEY=[$key]------VALUE=[$field{$key}]\n";
> }
> }
>
> But I am not getting the desired result.
>
> Thanks & Regards in advance
> Anirban Adhikary.
>
> --
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> http://learn.perl.org/
>
>
>
--
Thanks
Ram
<http://www.netcore.co.in/>
n <http://pragatee.com>