5

Return multiple values using for loop in perl

view full story
linux-howto

http://www.unix.com – I am using a for loop to copy files from say DIR1 and DIR2 to DIR3.I have to check whether files are copied from DIR1 and DIR2 and print the respective message. @path=("$DIR1","$DIR2"); foreach (@path) { $rc=system("cp $_/*xml $DIR3"); if ($rc == 0) { print "Files were copied successfully from $_\n"; } else { print "Files were not copied successfully from $_\n"; } } The above script works fine in perl but not working in perl web service.In perl web service the copy commands are executing but I am not able to (HowTos)