in reply to How to execute succcessful this Perl script in Linux, window and solaris?
well, it is just a WARNING, and nothing you must care about.
it' beacuse you are using require to import the module. There is already a bug-report-ticket issued on that "problem".
below, you find a cleaned up version.
#!/usr/bin/perl use strict; use warnings; if ( $^O =~ /^(MS)?Win/ ) { eval { require Win32::DriveInfo; my $TotalNumberOfFreeBytes = (Win32::DriveInfo::DriveSpace('c: +'))[6]; my $TotalNumberOfBytes = (Win32::DriveInfo::DriveSpace('c:'))[ +5]; print "This is $^O \n"; print "Total Free: $TotalNumberOfFreeBytes\tTotal size: $Total +NumberOfBytes\n"; }; print $@, "\ndone!"; } elsif ( $^O =~ /^linux/ ) { print "This is Linux OS!!!\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to execute succcessful this Perl script in Linux, window and solaris?
by esskar (Deacon) on Jun 29, 2006 at 06:15 UTC | |
by ikegami (Patriarch) on Jun 29, 2006 at 07:50 UTC | |
by wxfjordan (Initiate) on Jun 29, 2006 at 09:45 UTC |
In Section
Seekers of Perl Wisdom