Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Perlscript as login-shell Message-ID: <11418@jpl-devvax.JPL.NASA.GOV> Date: 13 Feb 91 01:08:10 GMT References: Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: comp Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 15 In article perf@efd.lth.se (Per Foreby) writes: : The problem: I can't find any way to distinguish between `su user' and : `su - user'. In c this is simple (*argv[0] == '-'), but perls $0 only : gives me the name of the script. : : I fear the problem is without solution, but please surprise me! In 4.0, you can get at this with $^P, the name Perl was invoked by. There's also $^D to access debug flags, and $^I to access the -i flag, and I may add $^W to access the -w flag. Maybe I should add a flag that makes the tokener accept metacharacters in place of keywords... :-) :-) :-) Larry