Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: -e on windows giving error

by ikegami (Pope)
on Nov 17, 2011 at 23:06 UTC ( #938697=note: print w/ replies, xml ) Need Help??


in reply to -e on windows giving error

I get no such popup.

Who built your Perl? What version is it? (I used ActivePerl v5.14.0.) I think there's a system call that configures the behaviour. (I can't remember what it's called.) There could be differences between our builds in how it's called.

Why kind of drive causes the popup? (I have a CD drive but no diskette drive.)

By the way, ever hear of loops? They are used to avoid having long lists of nearly identical code.

Update: Forgot to address your actual goal!

my objective here is to get the drive which my perl script lies in

use Path::Class qw( file ); my $vol = file($0)->absolute()->volume(); $vol = "$1:" if $vol =~ /^(?:\\\\\?\\)?([a-zA-Z])\z/; $vol = uc($vol) if $vol =~ /^[a-zA-Z]:\z/;


Comment on Re: -e on windows giving error
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://938697]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2014-08-28 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (257 votes), past polls