Date: Tue, 10 Jul 2001 00:04:07 GMT From: "John W. Krahn" Subject: Re: Some perl questions Message-Id: <3B4A46BF.A5125FF8@acm.org> 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 ? system() returns the return from "some command". Read the documentation. perldoc -f system > $rc = 0xffff & system ( "some command" ) ; > > 2. What does the following do ? Is it for initializing ? shift() shifts a scalar from an array. Read the documentation. perldoc -f shift > $abc = shift ; > > 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]
" ; > } print "$_
" for `ptree 128`; > 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 > > How do I fix this ? That is an HTML question, sorry I don't know HTML. John -- use Perl; program fulfillment