> The $0 variable already has it so no need for a sub or a new > variable. One thing is sometimes it reurns path info also > /home/joemama/test.pl That may or may not be a bad thign > depending on what you're doing. > > Test it out with this suicidal little script (or should I say > scripticide) > > #!/usr/bin/perl -w > use strict; > print "I am $0 hear me roar.\nGoodbye Cruel world!\n"; > unlink $0 || die $!;
I should probably put in here that having a script modify itself is a bad idea usually. So here's the disclaimer: This is an example, it is only an example, had it been an actual example you'd want to use it would not have been such a bone headed idea. Do not try this at home! professional driver on a closed course. :) > > HTH > DMuey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]