in reply to can't use string refs while "strict refs"

Have you read what strict#strict refs documentation has to say?

Also, you forgot to surround your code with <code> or <c> tags

  • Comment on Re: can't use string refs while "strict refs"

Replies are listed 'Best First'.
Re^2: can't use string refs while "strict refs"
by artifact (Novice) on Jul 30, 2012 at 06:28 UTC

    Thank you for your advice, further no such silly questions will be posted by me untill I have gone through the documnetation and also I'll be careful about the format ... I am using Beginning perl to learn perl as a beginner. can you tell me that am i going on the right path or do I need to follow some other books/references??

      It's not a bad book, but it's perhaps a little dated. Perl has moved on somewhat since it was published. Ovid's book (confusingly also called Beginning Perl!) is more in tune with current best practices; it's not going to be released until September, but you can read much of it online already.

      chromatic's Modern Perl is also well worth a read. Although it does go right back to Perl basics, it's written as much for experienced Perl programmers as it is for new ones, so you might find that it takes you from simple concepts to complex ones a little too quickly. Still it's well worth reading this one after you've finished learning the basics.

      perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'