Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: problem in printing the result in the out put file

by marto (Cardinal)
on Feb 28, 2017 at 16:35 UTC ( [id://1183163]=note: print w/replies, xml ) Need Help??


in reply to problem in printing the result in the out put file

Are you sure this is your code? $in_file2 isn't defined anywhere. Add use strict; use warnings;, fix the warnings given. Do you really have an and open(OUT, ">>port.txt"); for my $host = ....? You may also want to be careful with the scope of $ip, e.g.

my $ip = 1; my @ip = qw (2 3 4); foreach my $ip (@ip){ print "$ip\n"; } print "$ip\n";

Update: fixed code tag typo, thanks Eily.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-19 08:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found