> You mention checking out perlref in the perldocs - I'm familiar
> with "perldoc -f keyword", but how would I find information on
> these things if I didn't know the keyword "perlref"?

I can't find any email answering this question:

perldoc perl                   OR
perldoc perltoc

isn't it so obvious! :)  You can also find out about modules in
this same way, e.g.

perldoc strict
perldoc Data::Dumper

> (Apparently I'm the only legitimate "beginner" here!  =)

You point have a point there, most of the people who reply
to beginner questions are Perl experts.  Some are even
perverse enough to enjoy using references, slices and
anonymous datastructures whenever they could be useful.

[If none of the other experts recognise these traits as their
own, it is because I refer mainly to myself :)              ]

Of course, the best ways to hone your skills is to avoid
repetitive programming tasks, and help either by trying
to answer questions here or joining in the fun by writing
modules for CPAN.

> Oh, and one more question.  =)
> 
>    $lines[0] = [  "dog", "cat" ];
>    print "$lines[0][0,1]\n";
> 
> This prints "cat".  Shouldn't it print "dogcat"?

$questions_asked{bryan}++; # It's another question!  :)

To get this to work, use the following:

  $lines[0] = [  "dog", "cat" ];
  print "@{$lines[0]}[0,1]\n";

The precedence of just a @ is by default:

  @{$lines[0][0,1]}

which answers the problem others have been experiencing.

Take care,

Jonathan Paton

PS: Once upon a time we were all "beginners"!

=====
$_=q|.,&@$$. ,.@$&@$. .&$$@. ,,$ ....!$_=$p.'&$@.',y'&$@' .,';for(/\S+/g){
!|.q| .$ .,@, ,$, .,.. @, ,$ ,,@ .,,.!++$.<22?${'y'.$_}=chr$.+64:[$$=${'y'
!|.q| ,@$@&.,. $$$&, ..@&&$,,, $., ..!.$_},$y.=($.=~/22\|26\|3(3\|7)/x?' '
!|.q|. @  ., ,.&,,, , .$..&. .,$  .,,!.$$:"\l$$")]};$y=~/ (.*)/;warn"$1\n"
!|.q|. $ .,. .,$$&&$...&., @.,.&@$@ .|,map{-$|--?$r:$p.=$_}split'!';eval$r

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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

Reply via email to