I want to create a simple grep call in perl.
I have 2 variables.
$var1,$var2
and I want to get all the files that the name of the file starts with $var1 and the end of the file is $var2
what would be the syntax for a grep command in perl that does that.
I want to create a simple grep call in perl. I have 2 variables.
Share
Gets all file names in the current directory that start with
$var1and end with$var2:EDIT: To handle spaces and special characters as @Schwern and @ikegami correctly pointed out: