Date: Tue, 10 Jul 2001 09:34:39 +0000 From: gnari Subject: Re: Some perl questions Message-Id: <994757679.795332099311054.gnarinn@hotmail.com> In article , Kevin Joseph wrote: > >I have the following Perl related questions. Any assistance would be highly >appreciated. > >1. What does the following do ? Does it return the error level ? > >$rc = 0xffff & system ( "some command" ) ; > >2. What does the following do ? Is it for initializing ? > >$abc = shift ; > There comes with you perl a wonderful set of documentation. You would be advised to learn to use it. There should be the command perldoc installed. to get info on a particular builtin function, like 'shift', do: perldoc -f shift Also, you should try: perldoc perldoc perldoc perl perldoc perlfunc >3. I have written a couple of cgi scripts which run some system commands. >Say > >print "Content type : text/html" ; >.. >... >$abc = `ptree 128` ; >for $i ( 0 .. $#abc ) { > print "$abc[$i]
" ; > } >.... >... >The problem with this script is that it does not print the spaces which >appear ( if at all ) before $abc[$i] >So instead of outputing > 10 some proces > 100 some sub process > 100 some child process > >it prints > >10 some proces >100 some sub process >100 some child process > no actually it prints: 10 some process
100 some sub process
100 some child process
How this is displayed by your browser is another matter. >How do I fix this ? > learn HTML (and dont ask about that in this newsgroup!) gnari