abhi jain wrote: > I want to know which perl has called my program. > > For Ex : If I call perl program as bellow. > > # /usr/bin/perl5.8.5 prog.pl > I should get /usr/bin/perl5.8.5 > > # /usr/bin/perl5.8.8 prog.pl > I should get /usr/bin/perl5.8.8 > > Thanks in advance > Abhi Jain > >
The version is stored in the special variable $^V that is, a dollar sign and control-V. The version and patch level is stored in $] my ( $major_version, $minor_version, $patch_level ) = $] =~ m{ \A (\d+) \. (\d\d\d) (\d\d\d) \z }msx; See `perldoc perlvar` and search for /\$\]/ http://perldoc.perl.org/perlvar.html#%24] -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/