in reply to Can the username be represented differently ?

You could quite easily use UID/GUID (and in fact some anti spam headers do, the values live in $> and $< )

[james@devel3 root]$ perl -e 'print $>,$/, $<, $/'; 506 506 [james@devel3 root]$ su root Password: [root@devel3 root]# perl -e 'print $>,$/, $<, $/'; 0 0 [root@devel3 root]#

cheers

tachyon

Replies are listed 'Best First'.
Re: Can the username be represented differently ?
by peterr (Scribe) on Jun 28, 2004 at 06:02 UTC
    Hi,

    I get a "premature end of script headers" message, when trying with this

    #!/usr/local/bin/perl -w print $>; print $/; print $<; print $/;


    Peter

      I get a "premature end of script headers" message, when trying with this

      That would be because you are using CGI and not sending any headers :o) See CGI Help Guide

      #!/usr/local/bin/perl -w print "Content-Type: text/plain\n\n"; print $>; print $/; print $<; print $/;

      cheers

      tachyon

        Boy, am I "rusty" or what, adding that line of code you suggested did the trick, the output to the browser is now:

        32149
        32149

        Thanks a lot,

        Peter