On Thu, 2008-04-24 at 22:05 +1000, Amos Shapira wrote: > On Wed, Apr 23, 2008 at 5:37 PM, Sonia Hamilton <[EMAIL PROTECTED]> wrote: > > In my bash scripts I often use this (to change to the directory where > > the script is): > > > > cd $(dirname $0) > > > > Is there an equivalent in perl? > > 1. Short answer: http://perldoc.perl.org/File/Basename.html, and "$0" > in perl works like in the shell.
Thanks everyone for all your replies about this. > 2. Longer answer: install the FF search engines for perldoc.perl.org > and CPAN and you'll always be a simple search away from answers to all > perl-related questions you'll ever have. The difficulty in solving problems in any new topic is often knowing what question to ask :-) I searched and searched (got the perl doco locally), but didn't know what to look for... -- Thanks, . Sonia Hamilton http://soniahamilton.wordpress.com http://www.linkedin.com/in/soniahamilton . Your manuscript is both good and original; but the part that is good is not original and the part that is original is not good - Samuel Johnson. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html