add apostrophes with regular expression in perl -
I'm searching the directory with command Sometimes, files have special characters in the name: For this reason, I want to add aproprows in every search directory. For example: After the regular expression is applied, the result should be: What is a regular expression (2) $ Filter = ~ s! (\ S +)! '$ 1'! G; Better way to do this: Regards, ls -ld /path1/*.ext1 / path2 / *. Ext2 , e.t.c.
) ,
(, etc.).
$ filter = "ls -ld / Path1 / * ext1 / path2 / * ext2 "; (1) $ filter = ~ ...; (2)
ls -ld '/ path1 / * ext1' '/ path2 / * ext2' (with apostrophes)
while (globe ("/ path1 / * ext1 / path2 / * ext2") {process_file ($ _);}
Comments
Post a Comment