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

Re: Create output from Perl hash

by Eily (Parson)
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1209053]
help
Chatterbox?
[karlgoethebier]: thao4: Si tout le reste échoue demande en francais ;-) There are some French speaking monks in the monastry...
[erix]: weird: a dev version perl (perl-5.27.9) is released, but git doesn't contain a perl-5.27.10 yet
[karlgoethebier]: ...not me ;-)

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2018-02-21 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (277 votes). Check out past polls.

    Notices?