Monks,

Need your help. I have the following script running under Win2k:
use strict; use warnings; use Net::FTP; use Win32::File0p; my $hostname = '192.168.55.3'; my ($user, $pass) = ("user",'password'); my $Local = 'f:\winnt\win32\system32\dhcp\'; my $day = qw(Sun Mon Tue Wed Thu Fri Sat)[(localtime())[6]]; my $file = "dhcpsvrlog\.$day"; Map F => '\\\\192.168.1.15\\c$', { persistent => 1 } or die "Can't map drive: $!\n"; my $ftp=Net::FTP -> new($hostname) or die ("Connect failed"); $ftp->login($user,$pass) or die ("cant Login"); $ftp->put($file) or die ("Can't upload"); $ftp->quit; unmap F;
When I run it from DOS, I get the error:
Can't locate Win32/File0p.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at cp_dhcp_logs.pl line 6. BEGIN failed--compilation aborted at cp_dhcp_logs.pl line 6.
But I have another script:
use strict; use warnings; use Win32::FileOp; Map F => '\\\\192.168.1.15\\c$', { persistent => 1 };
That runs fine. I checked and Fileop.pm is under the Win32 directory in c:\perl\site\lib. Any idea what I'm doing wrong?

Thanks,
Dru

In reply to Problems with @INC in Win by Dru

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.