[Gllug] Perl 'running' python and bash

Mark Hill lists at mark.ukfsn.org
Sun May 1 11:52:57 UTC 2005


Hi,

I've accidentally found that perl will 'run' python, bash and possibly
other scripts. Through a bit of investigation, it seems that perl will
look at the shebang line of a given script and call the appropriate
interpretter. E.G: A python script consisting of:

#!/usr/bin/python
print "Hello"

Can be executed as perl file.py

Is there any reason why perl does this, or was it implemented just for
fun? 

Thanks. 

-- 
Mark Hill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20050501/f7965a8c/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list