![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Copying Files and | patilmukundraj | SUN Solaris | 1 | 12-30-2007 03:04 PM |
| Copying files in AWK | koti_rama | Shell Programming and Scripting | 4 | 08-02-2007 01:55 AM |
| copying files between two accounts | hinman | UNIX for Dummies Questions & Answers | 2 | 02-06-2007 11:39 PM |
| Copying files | alpheusm | UNIX for Dummies Questions & Answers | 4 | 10-18-2002 02:18 AM |
| copying files from Unix to NT 4.0 Sp5 | regimbaldpj | UNIX for Advanced & Expert Users | 3 | 11-02-2001 04:03 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
perl - copying files
Folks, here is my code:
I am a serious newbie, why doesn't this make copies of my files? I dont get any errors, the files are just not created. Your help is appreciated #!/usr/bin/perl use File::Copy; $PWD = `pwd`; $REPORTDIR = "/usr/local/tripwire/tfs/report"; chdir $REPORTDIR; for (`ls /usr/local/tripwire/tfs/report | grep 2007`) { copy("$_","copyfile-$_"); } |
|
||||
|
First, make sure $_ in the loop is really populated with what you expected to get.
Second, capture all the errors. You called copy() but do not follow by die(), so you will never know why the copy failed. Otherwise, the error should tell you why. File::Copy - perldoc.perl.org |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|