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

Re: No such file or directory at R_loop2.pl line 19.

by ig (Vicar)
on Aug 28, 2012 at 06:26 UTC ( #990146=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach my $file (@lines) {
        open(my $fh, '<', $file) or die "$file: $!";
        ...
    }
    
  2. or download this
    my $file = "junk.txt";
    open (my $fh, '<',  $file) or die "Can't open $file for read: $!";
    ...
        push (@lines, $_);
    }
    close($fh) or die "Cannot close $file: $!";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://990146]
help
Chatterbox?
[stevenlm87]: Needs help. I am taking an online class for perl and is using Padre. How can I get a list from the input in this code? print "What are your favorite hobbies? "; my $hobbies = <STDIN>; chomp $hobbies; print "Your favorite hobbies are '$hobbies'\n";

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2017-02-23 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (350 votes). Check out past polls.