Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004

    Unanswered: Wildcards in Perl


    I am trying to construct a Perl script to copy files from one directory to another, but do not have specific names for the files. All the files are .lxf types. How do I use wildcards in perl script when copying files? I have tried *.lxf but this does not seem to work...I am new to Perl and learning as I am converting old scripts to Perl so apologises if I have missed something obvious! I cant seem to find any information through the Perl O'Reilly book range...any help is much appreciated...I have included my current script below...Thanks

    use File::Copy;
    copy("\\\\Webmail\\S\$\\Logo\\*.lxf","C:\\Perl\\") ;

  2. #2
    Join Date
    Mar 2004
    Replace double quote by simple quote. And remove all escape char (\)

  3. #3
    Join Date
    Aug 2008
    You can use forward slashes instead of back slashes - so instead of two \\ use one /

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts