> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf
> Of Borkur Gudjonsson
> Sent: Saturday, May 27, 2000 11:14 PM
> To: Perl-Win32-Users Mailing List
> Subject: Get program name
>
>
> I create a exe file out of my script, with perl2exe,
> and I would like to be able to print out the name of
> the program.
>
> If I make a script, prog.pl, whith this statement:
> print $0;
>
> and create an executable with perl2exe, it prints out
> the name of the script, as it was when perl2exe
> created the executable and not the name of the executable,
> prog.exe!
>
> And if I change the name of the executable, it still
> prints out prog.pl!
>
> Is there no way to make this dynamic, to print out
> the name of the executable as it is when it is is run?
>
> Can someone help me with this please?
> Borkur Gudjonsson
I'm just guessing here, but try $ARGV[0] instead of $0
Maybe you have to strip off the path...
--
robert friberg, ensofus ab
+46(0)708 98 57 01
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]