In this script i am trying to get the value in "$file" but the if condition fails like "files not exists" filename like : sample.tar.gz Also how to ignore the . and .. files in directory#!/usr/bin/perl use Net::FTP; use Net::FTP::File; my $directory = '/tmp/bkp'; opendir (DIR, $directory) or die $!; while (my $file = readdir(DIR)) { next unless ($file =~ m/\.gz$/); print $file; if( -e $file)
In reply to Need Urgent help in perl by arvindmarlabs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |