Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Argument .. isn't numeric in array slice

Posted on 2009-03-30
3
Medium Priority
?
1,463 Views
Last Modified: 2012-05-06
I'm not sure I understand this error in the context of my code

    map {
        my $mySTR = "sample";
        $myArr[$_][0] = $mySTR;                             
    } 0..$#myArr

Argument "sample" isn't numeric in array slice

error is shown for line
my $mySTR = "sample";
0
Comment
Question by:NewtonianB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 2000 total points
ID: 24025062
What is in @myArr and what are you trying to do?
Did you mean something like
do {
        my $mySTR = "sample";
        $myArr[$_][0] = $mySTR;                            
    } for 0..$#myArr
0
 

Author Comment

by:NewtonianB
ID: 24025082
well that solved it thanks!
After trying your method I realized its what I was wrapping around the map was causing the disturbance.
0
 

Author Closing Comment

by:NewtonianB
ID: 31564643
cheers!!!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question