I've got a simple perl script where I am looping thru a directory and for each file I am 1) parsing the file, and 2)moving the file elsewhere. The parsing and moving subroutines are in external files. Independently they each work, but when I call one after the other, the parse works, and the move doesn't. It also only cycles thru one file in the directory. I'm thinnking this has to do with how the first subroutine (parsing returns). I've got some code snippets below - can someone help me figure out what I'm doing wrong?
Main file:
use Parse; # my custom Parse.pm in /etc/perl/ use Moving; # my custom Moving.pm in /etc/perl ..... foreach $file (@filelist) { Parse::parse_file($file); Moving::move_file($file); .....
In Parse.pm, it parses the file - at the very end of the function I have a "return 1" to indicate success.
Somehow it is never getting to Moving.pm, so I"m thinking it must have something to do with the return from Parse.pm - ?? does anyone have any suggestions? thanks-
In reply to return from external subroutine by kathys39
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |