I believe you have misunderstood the use of $ENV{'PATH'}. It is the path searched to find executables by name when no full path is given. When found, the executable runs in $ENV{'PWD'}, the current working directory.
gzip will happily do what you want if you just tell it where to find the file. Adjusting your pseudocode:
while (args here) { $new_dir = code to figure out correct path... $file = code to determine file to work on... $fullpath = "/home/mysite/documents/daily/$new_dir/$file"; system("gzip $fullpath") == 0 or die "can't gzip file"; }
After Compline,
Zaxo
In reply to Re: gziping files on server
by Zaxo
in thread gziping files on server
by filmo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |