1828340 Members
3231 Online
109976 Solutions
New Discussion

pearl script

 
subhashni
Regular Advisor

pearl script

I have an executable pearl script ,i like to view that and modify .I'm not the scripting person.How could i do that.Please help.
Thanks
unix4me
5 REPLIES 5
Rodney Hills
Honored Contributor

Re: pearl script

A "script" would typically be a text file and so should be readable.

If it is a permission issue, then have the root user increase the permissions for you.

If you are not a scripting person, then specific questions could be answered here but full blown analysis of any large script may be a bit to ask.

HTH

-- Rod Hills
There be dragons...
subhashni
Regular Advisor

Re: pearl script

Thanks for the reply.When i did file on this
script i saw this is an executable shell script.So that i was wondering if i can edit it.
Thanks
unix4me
steven Burgess_2
Honored Contributor

Re: pearl script

Hello

edit it with vi or your favourite editor

HTH

Steve
take your time and think things through
Muthukumar_5
Honored Contributor

Re: pearl script

Check the permission of the file with ll <scriptname>

By normal all user's are allowed to read / write there.

To view it use

cat <scriptname>

It is good to start as by copying that script to some name and do edit there :)

You have to change the new file permission to 755 to execute or as,

perl <script>.pl

- Muthu
Easy to suggest when don't know about the problem!
Ralph Grothe
Honored Contributor

Re: pearl script

Just an aside,
you may find that the "core" HP-UX Perl interpreter cannot execute (or even compile) your Perl script because it simply is a bit dated.
On older installations they even used Perl 4, and there was a dramatic leap in Perl functionality and syntax between Perl 4 and 5.
Because usually /usr/contrib/bin is in your PATH before most other stuff it could happen that you invoke the Perl 4 interpreter.
I think some HP-UX crash dump analysis tools use this one, therefore *don't* remove it.
Better look if you have a more current Perl installed.

$ perl -v

shows the version of the Perl 1st in PATH

$ perl -V

shows even more (like the important @INC array, where your Perl libs and modules are installed.

Try also

$ /usr/sbin/swlist perl

or

$ /usr/sbin/swlist|grep -i perl

If you get a hit you can look for the bin directory

e.g.

$ /usr/sbin/swlist -l file perl | more

(or whatever the package name is for perl)

Set your environment such that this path comes before the /usr/contrib/bin.

You can then try if you get your Perl script compiled (viz. see if there are no syntax faults)

$ perl -cw /path/to/your/script.pl
Madness, thy name is system administration