in reply to Re: Need a quick file check/checkout script if anyone has a moment. :)
in thread Need a quick file check/checkout script if anyone has a moment. :)

Hm, here's what I have: ---
use perl::net::Utils;

if (-e $path) {
print "$path exists\n";
}

my $time = Dtg( time() );
print "The DTG time is $time\n";


(dtg is a module from utils.pm)

I get a 'use of uninitialized value in -e' error.

Thanks very much for the quick response, really appreciate it. =)
  • Comment on Re^2: Need a quick file check/checkout script if anyone has a moment. :)

Replies are listed 'Best First'.
Re^3: Need a quick file check/checkout script if anyone has a moment. :)
by si_lence (Deacon) on Sep 30, 2004 at 15:56 UTC
    you need to set the $path variable to the path of the file you want to test. So in your case:
    use strict; use warnings; use perl::net::Utils; my $path ='\perl\net\Utils.pm'; if (-e $path) { print "$path exists\n"; } #more code here
    si_lence
      Aha! That worked, thank you very much!

      Now if I can figure out how to check the file itself and how to check it out, I'm in business! :)