Thanks - Shaji, Uri and Shawn for your valuable inputs. Apprecaite it.
Cheers !
On Fri, Dec 13, 2013 at 3:33 PM, Uri Guttman wrote:
> On 12/13/2013 10:21 AM, Shaji Kalidasan wrote:
>
>> Greetings,
>>
>> Thanks a bunch Uri and Shawn for providing valuable inputs.
>>
>> Here is the optimized c
On 12/13/2013 10:21 AM, Shaji Kalidasan wrote:
Greetings,
Thanks a bunch Uri and Shawn for providing valuable inputs.
Here is the optimized code after corrections (based on inputs from Uri and
Shawn)
[code]
use strict;
use warnings;
my %complex_hash;
my @ex = qw / 5326 2041 1391 1439 x1259
Greetings,
Thanks a bunch Uri and Shawn for providing valuable inputs.
Here is the optimized code after corrections (based on inputs from Uri and
Shawn)
[code]
use strict;
use warnings;
my %complex_hash;
my @ex = qw / 5326 2041 1391 1439 x1259 /;
open my $fh, "<", "fullhost.txt" or die $!
On 12/13/2013 10:09 AM, Shawn H Corey wrote:
On Fri, 13 Dec 2013 10:01:13 -0500
Uri Guttman wrote:
open my $fh, "<", "fullhost.txt" or die $!;
while (<$fh>) {
while( my $line = <$fh> ) {
chomp;
chomp $line;
yep!
uri
--
Uri Guttman - The Perl Hunter
The Best Perl Jobs, The
On Fri, 13 Dec 2013 10:01:13 -0500
Uri Guttman wrote:
> > open my $fh, "<", "fullhost.txt" or die $!;
> > while (<$fh>) {
>
> while( my $line = <$fh> ) {
> > chomp;
chomp $line;
> > my $line = $_;
>
> no need to copy $_ as the while did it.
--
Don't stop where the ink doe
On 12/13/2013 07:43 AM, Shaji Kalidasan wrote:
Greetings,
Here is one way to do it. Please note that I have retained your variable naming
conventions and style instead of inventing my own.
[code]
use strict;
use warnings;
my %complex_hash;
my @ex = qw / 5326 2041 1391 1439 x1259 /;
open my
Greetings,
Here is one way to do it. Please note that I have retained your variable naming
conventions and style instead of inventing my own.
[code]
use strict;
use warnings;
my %complex_hash;
my @ex = qw / 5326 2041 1391 1439 x1259 /;
open my $fh, "<", "fullhost.txt" or die $!;
while (<$f
Dear All,
I have sample code below, i am trying print the matching array element
values sorted in the hash.
As you would notice only one of the array element "x1259" will print its
value "IDT" stored in the hash.
Please could you advice how can i get rest of the array elements matched in
the has