>
> Thanks,
> Michael
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> http://learn.perl.org/
>
>
>
--
Jialin Li
832-618-3598
Chas,
Thank you for your remind. It is helpful.
Best,
Jialin
On Wed, Apr 9, 2008 at 3:51 PM, Chas. Owens <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 9, 2008 at 4:31 PM, Jialin Li <[EMAIL PROTECTED]> wrote:
> > substr($string,0,2) will give you the first two digits
> >
nge-Operators
>
>
> --
> Chas. Owens
> wonkden.net
> The most important skill a programmer can have is the ability to read.
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> http://learn.perl.org/
>
>
>
--
Jialin Li
832-618-3598
my $input =q(C:\Windows\%Person%\%Class%);
my @vars = $input =~ /%([^%]+)%/g;
local $, = $/;
print @vars;
On Tue, Apr 15, 2008 at 10:20 PM, Ley, Chung <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> I have a program that will take in a string that will resolve to a path
> where the output is going
#!/usr/bin/perl -w
my (%hosts, %servs);
while () {
chomp;
my ($host, $server) = (split /,\s*/)[0,4];
$hosts{$host}++ if ($host);
$servs{$server}++ if ($server);
}
my @dup_hosts = map { substr $_,0,5,''; $_ }
grep { $hosts{$_} > 1 } keys %hosts;
my @dup_servs = map { substr $_,
comma operator has a higher precedence than 'or' operator,
so when require fails, eval returns undef and perl will
continue to set the status then return 0,
so your rewritten code will work exactly the same as the original code.
On Wed, Apr 16, 2008 at 9:02 PM, Jennifer G. <[EMAIL PROTECTED]>
wro