No such thing as a small change | |
PerlMonks |
How to extract the filenames in an arrayby Anonymous Monk |
on Sep 17, 2008 at 04:13 UTC ( [id://711862]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi
I am a beginner in perl scripting. How do i can extract the file name in an array so that i can use some part of the file name? I have tried something like this. #!/usr/bin/perl -w @namearr = `ls /usr/C`; @name1=$namearr[0]; print ("$name1[2]\n"); Thanks.
Back to
Seekers of Perl Wisdom
|
|