How to open multiple files in Perl -
guys im confused now. im new learning perl. book ive read perl codes , linux commands.
is there connection between them? (perl codes , linux commands)
i want open multiple files using perl code, know how open single file in perl using:
open (myfile,'somefileshere');
and know how view multiple files in linux using ls command.
so how this? can use ls in perl? , want open files (perl files) dont have file extension visible (i cant use *.txt or etc. guess)
a little guys
use system
function execute linux command, glob
- list of files.
http://perldoc.perl.org/functions/system.html
http://perldoc.perl.org/functions/glob.html
like:
my @files = glob("*.h *.m"); # matches files .h or .m extension system("touch a.txt"); # linux command "touch a.txt"
Comments
Post a Comment