Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^4: path to perl interpreter

by rnahi (Curate)
on Sep 29, 2005 at 08:56 UTC ( #496018=note: print w/replies, xml ) Need Help??


in reply to Re^3: path to perl interpreter
in thread path to perl interpreter

Hi. My nick is rnahi, not "Mhai."

You are referring to something that looks like copyrighted material with wrong information.

Have a look at the official docs .

$^X
The name used to execute the current copy of Perl, from C's  argv[0] .
Depending on the host operating system, the value of $^X may be a relative or absolute pathname of the perl program file, or may be the string used to invoke perl but not the pathname of the perl program file. Also, most operating systems permit invoking programs that are not in the PATH environment variable, so there is no guarantee that the value of $^X is in PATH.

Replies are listed 'Best First'.
Re^5: path to perl interpreter (use Config)
by grinder (Bishop) on Sep 29, 2005 at 12:53 UTC
    the value of $^X may be a relative or absolute pathname of the perl program file, or may be the string used to invoke perl but not the pathname of the perl program file.

    In that case, wheel out the heavy artillery.

    use Config; my $perl = $Config{perlpath}; $perl .= $Config{_exe} if $^O ne 'VMS' and $perl !~ /$Config{_exe}$/i; print "executable is $perl\n";

    (Completely off-topic: This is my 1000th post!)

    • another intruder with the mooring in the heart of the Perl

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://496018]
help
Chatterbox?
[james28909]: check if it is a hash or an array ect with ref in one sub.
[james28909]: like all the subs calling get_data get_array get_ect, you could just use get_data. once you send the data to get_data, check if it is a hash or an array ect. and do functions for each, in one sub
[james28909]: that looks like it would be alot more work than just renaming the sub though lol
[Lady_Aleena]: james28909, did you even look at the subs?
[james28909]: yes
[Lady_Aleena]: And you see how the first two are vastly different than the third, right?

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2017-05-24 04:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?