---------- Original Message -----------
From: "LI NGOK LAM" <[EMAIL PROTECTED]>
To: "Josh Corbalis" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Sent: Wed, 23 Jul 2003 02:52:16 +0800
Subject: Re: print command help

> ----- Original Message ----- 
> From: "Josh Corbalis" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 23, 2003 2:24 AM
> Subject: print command help
> 
> > I'm writing a webmin module and I'm trying to add a search function in
> right
> > now but after I search for it and try to display the output it has a
> problem
> > with the way the output is formatted.
> >
> > print "searchtest<gimp><10>"; will print searchtest<10>
> > print "searchtest< gimp><10>"; will print searchtest< gimp><10>
> >
> > I don't understand why it will not print any of what is inside the <> if
> what
> > is right next to the < is a letter. Numbers and spaces will print
> everything
> > on the line but a letter discards everything in the brackets. I've tried
> to
> > escape the special meaning of the <> characters when used with a word but
> it
> > didn't work. Does anybody out there have any insight into this problem?
> >
> 
> In Perl, <> means nothing in string, it only means :
> 
> open FH, "file.txt"; $line = <FH>; close FH;
> it reads one line from the file.txt and give the value to $line.
> 
> or
> 
> open FH, "file.txt"; @lines = <FH>; close FH;
> it reads all the context to array (@lines) from file.txt,
> elems are splitted by each \n ( or \r\n ) from file.txt
> 
> So, what your trying to looking for might be :
> 
> print `searchtest <gimp> <10>`; # exec a shell command
> or
> print "searchtest $val1 $val2";
> 
> HTH

Actually the value 'searchtest<gimp><10>' is all stored in one variable. It
prints the searchtest<10> fine but ignores the <gimp> because ofthe <>
surrounding it. The variable is printed in a double quoted string

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to