Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Extracting IP addresses from a file...

by tachyon (Chancellor)
on Jul 05, 2001 at 00:02 UTC ( [id://93928]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $data = <<'DATA';
    foo 1.1.1.1 foo
    ...
    
    print "While works and gives:\n";
    print "$_\n" for @ips;
    
  2. or download this
    $data = <<'DATA';
    foo 1.1.1.1 foo
    bar 22.22.22.22 bar
    ...
    
    print "Foreach now gives:\n";
    print "$_\n" for @ips;
    
  3. or download this
    open FILE, "<path/to/file" or die "Oops, Perl says: $!";
    {
    ...
        $data = <FILE>;
    }
    close FILE;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-24 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found