Solved

Argument .. isn't numeric in array slice

Posted on 2009-03-30
3
1,350 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
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
cheers!!!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now