[Thamesvalley-pm] using third party perl scripts

Charlie Harvey charlie at peopleandplanet.org
Tue Oct 16 06:49:29 PDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greg Matthews wrote:
> This question will probably show my naivity... I have a perl script that 
> I want to make use of in my own perl scripts. I dont want to have to 
> mangle the original script as I will loose the ability to easily 
> incorporate updated versions. How can I call the first script from my 
> own? Do I have to resort to a system()
> 
> GREG

Hey Greg,

Sounds like you need to use do or eval.

do EXPR

Uses the value of EXPR as a filename and executes the contents of the
file as a Perl script.

    do 'stat.pl';

is just like

    eval `cat stat.pl`

http://perldoc.perl.org/functions/do.html

Cheers,

- --
Charlie Harvey
IT Officer
People & Planet

Printing causes pollution and wastes energy and paper.
Please consider not printing this email. Thanks.


Shared Planet 2007 | 16 - 18 November | Sheffield University

The UK's biggest student campaigning event. Designed to inform and
inspire you to take action on poverty, human rights and the environment.

Tickets cost just £16 before 26 October. Book now

http://peopleandplanet.org/sharedplanet
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHFMFpy48xIMwPXm0RAlBpAJ9ZGG+pkwd3d6AJrJ3HXbTyGLS+pACglc6Y
61XtKYBszpe67SU7U9BJaMc=
=1uy7
-----END PGP SIGNATURE-----


More information about the Thamesvalley-pm mailing list