Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Reading IP from a file and SNMP

by radiantmatrix (Parson)
on Aug 26, 2004 at 14:06 UTC ( [id://386024]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Reading IP from a file and SNMP
in thread Reading IP from a file and SNMP

I highly suggest getting copies of Learning Perl, Programming Perl, and The Perl Cookbook.

To get you started, you can read files like this:

open FH, '<', $filename or die ("Can't open $filename"); #FH is a "filehandle", and the '<' means "open in read mode" #('>' would be write) while (<FH>) { #the angles around FH mean "read a line" work_with_the_line($_); # $_ holds the current line in this case # work_with_the_line would be a subroutine defined by you } close FH; #don't forget to close files!
Much perl code is out there "in the wild", I highly suggest searching to see if someone has solved a similar problem, then reading and learning from their source.
--
$me = rand($hacker{perl});

Replies are listed 'Best First'.
Re^4: Reading IP from a file and SNMP
by atcroft (Abbot) on Aug 26, 2004 at 14:19 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-19 23:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found