Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: What is the error in my script or file setup?

by tachyon (Chancellor)
on Jul 30, 2001 at 18:37 UTC ( [id://100883]=note: print w/replies, xml ) Need Help??


in reply to What is the error in my script or file setup?
in thread File Input and Output

This works:

@list = qw( fred 20.4 harv 5.6 tony 5.13 dennis 401.1 ); $i="harv"; foreach $list(@list) { if($i eq $list) { print "YES!\n"; } }

Suggest you add open (FILE, "input.dat") or die "Oops can't open input.dat Perl says $!\n"; which will *probably* tell you that perl cna't find your file. Also you don't need to push your data into an array as you do but that is by the by.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Log In?
Username:
Password:

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

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

    No recent polls found