Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^3: perl can find the file but can not open the fileby 7stud (Deacon) |
on Mar 11, 2013 at 05:23 UTC ( [id://1022738]=note: print w/replies, xml ) | Need Help?? |
So I searched the internet and found the site that suggested the single quotes So your question boils down to: "In the following code, I used the exact same string for a file test and in open(), yet my code doesn't work as expected:
Stripping away the code, one can only wonder why you think the two strings: "$file" '<./$file' ...are the same. There are several differences. So I searched the internet and found the site that suggested the single quotes You can learn about the difference between double quotes and single quotes, as well as many other useful things, like how to properly open() a file, which you aren't doing, in "Learning Perl 6th". Is there a way to find all the dependencies before I try to install a module from CPAN? Well, most people don't install from source. Instead, they just type: $ cpan Some::Module and the cpan command handles downloading and installing all the dependencies. However, the first time you try to use the cpan command, you have to do some setup, which may or may not go smoothly. More recent versions of perl come with the cpanm command, which stands for cpan minus, which is like cpan, but with no setup required: $ cpanm Some::Module And if you don't have cpan minus, you can download the App::cpanminus module from cpan. There are two kinds of perl, modern perl and the shite that existed before that. You seem to be learning the shite. I suggest you alter course.
In Section
Seekers of Perl Wisdom
|
|