Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: 2 versions of perl

by marc_ (Deacon)
on Apr 12, 2008 at 10:16 UTC ( [id://679973]=note: print w/replies, xml ) Need Help??


in reply to 2 versions of perl

In bash: alias perl-10='/path/to/perl-5.10/bin/perl'
In t/csh: alias perl-10 /path/to/perl-5.10/bin/perl'

Replies are listed 'Best First'.
Re^2: 2 versions of perl
by oko1 (Deacon) on Apr 12, 2008 at 15:20 UTC

    That would be fine if you were trying to invoke Perl from the commandline; it won't work for a script.

    ben@Tyr:~$ alias foobar="/usr/bin/perl" ben@Tyr:~$ cat <<! >xyz > #!foobar -w > print \$ARGV[0] > ! ben@Tyr:~$ chmod +x xyz ben@Tyr:~$ ./xyz Hello -bash: ./xyz: foobar: bad interpreter: No such file or directory
    
    

    Update: Added a '\' in front '$ARGV'. It doesn't change the outcome, but it actually puts "$ARGV[0]" instead of "[0]" into 'xyz'...

    -- Human history becomes more and more a race between education and catastrophe. -- HG Wells

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-03-29 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found