Leonid Grinberg wrote:
> my @split_line = split(/\:/, $line);

You don't have to escape the colon in a regular expression.

> my $home = $split_line[5];
> my @split_home = split(/\/, $home);
                         ^^^
Syntax error.  The terminating delimiter is missing.

> return uc($split_home[scalar(@split_home) - 1]);

"scalar(@split_home) - 1" could also be written as "$#split_home" or just "-1".


John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to