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

Re: Trying to make a search Part 2

by infoninja (Friar)
on Jun 05, 2000 at 20:06 UTC ( [id://16438]=note: print w/replies, xml ) Need Help??


in reply to Trying to make a search Part 2

Actually, the use of @data will read each remaining line of the filehandle into an array element of @data. The code below illustrates this (assuming that the file test.pl exists in the directory where the code is run):
#!/usr/bin/perl -w use strict; open(TEST,'test.pl'); my @test = <TEST>; my $line_number = 0; foreach (@test) { ++$line_number; print "$line_number: $_"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://16438]
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: (1)
As of 2024-04-25 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found