Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Create output from Perl hash

by Eily (Prior)
on Feb 13, 2018 at 10:35 UTC ( #1209053=note: print w/replies, xml ) Need Help??

in reply to Create output from Perl hash

I was about to say that since my %hash is inside the loop you get a new empty hash on each iteration, but on closer look it seems you don't even need the hash in the first place. Just check if $line =~ /MSISDN=(.*);/, if true, then $MSISDN is $1 (you don't even have to remove the leading whitespace). But then again your expected output contains a lot of data that is not in your input, so it's very unclear how you are supposed to obtain it.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1209053]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2018-07-18 20:47 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (395 votes). Check out past polls.