Re: How Could I print the next line after a REGEX match?

2011-11-26 Thread Shlomi Fish
Hi Raito, On Sat, 26 Nov 2011 23:31:06 -0600 Raito Garcia wrote: > hi > > Well today i have another dude, I have a HTML file like this content: > > > > > > Remote host information align="center" border="0" width="60%"> > > Operating System : > Windows 7 Enterprise > > > NetBIOS name :

How Could I print the next line after a REGEX match?

2011-11-26 Thread Raito Garcia
hi Well today i have another dude, I have a HTML file like this content: Remote host information Operating System : Windows 7 Enterprise NetBIOS name : GUSR712DPO16125 DNS name : My code is this: #!/usr/bin/perl #Variables my $line=""; my $aux=0; #REGEX open(H,"Report.html") ||

Re: "$host = shift || $hostname;" vs. "$host = $hostname;"

2011-11-26 Thread Rob Dixon
On 26/11/2011 21:55, Brandon McCaig wrote: I just skimmed perlop again and it doesn't seem to explicitly say that&& and || and other related operators return the last evaluated operand instead of a boolean (the latter being what C and many other "static" languages do). I guess it's just somethi

Re: "$host = shift || $hostname;" vs. "$host = $hostname;"

2011-11-26 Thread Brandon McCaig
On Sat, Nov 26, 2011 at 04:19:58PM +0100, JPH wrote: > Also I wasn't aware of the || construction to use for setting > default values when ARGV (in this case) is undefined. Modern Perls have a new operator, defined-or, which is //. This is similar to || except that it tests the left operand's defi

Re: "$host = shift || $hostname;" vs. "$host = $hostname;"

2011-11-26 Thread John W. Krahn
JPH wrote: I think the below answers my question. Yes. About that. Please do not top-post. TIA. I thought maybe the code was doing some perl magic, but it is probably just a leftover from something else. Also I wasn't aware of the || construction to use for setting default values when ARG

Re: "$host = shift || $hostname;" vs. "$host = $hostname;"

2011-11-26 Thread JPH
I think the below answers my question. I thought maybe the code was doing some perl magic, but it is probably just a leftover from something else. Also I wasn't aware of the || construction to use for setting default values when ARGV (in this case) is undefined. Thnx all! On 11/24/2011 09:05 P