To print all the files starting with "f" in the current directory use the script below
@array=
print "@array\n";
G:\perl_programs>perl perl_globbing.pl
function_perl.pl function_sendarray.pl
This concept can be also used to delete all the backup files ending with .bak in the current directory using the following lines:
unlink(<*.bak>);
No comments:
Post a Comment