Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Combining Files using Hash

by chaney123 (Acolyte)
on Sep 05, 2017 at 07:07 UTC ( [id://1198680]=note: print w/replies, xml ) Need Help??


in reply to Re: Combining Files using Hash
in thread Combining Files using Hash

Hi,

I tried this and "Use of uninitialized value $key in exists at reformat_rpt.pl" and "Use of uninitialized value $key1 in exists at reformat__rpt.pl" are shown. Why does this happen?

Thanks

Replies are listed 'Best First'.
Re^3: Combining Files using Hash
by poj (Abbot) on Sep 05, 2017 at 07:42 UTC
    Why does this happen?

    Maybe you have some blank lines at the end of the file. Add a check like this

    while (my $line1 = <$file2>){ next unless ($line1 =~ /\S/); # skip empty lines chomp $line1;
    poj

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1198680]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found