473,383 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

create dynamically names

34
hi all,
how to create arrays like this using for loop

my @array_1
my @array_2
my @array_3
my @array_4
my @array_5
my @array_6
my @array_7
my @array_8
my @array_9


please tell me.
Apr 21 '07 #1
3 1120
pnsreee
34
hi all,
how to create arrays like this using for loop

my @array_1
my @array_2
my @array_3
my @array_4
my @array_5
my @array_6
my @array_7
my @array_8
my @array_9


please tell me.
using this code im trying...............but not getting

my $num;
for($num = 1;$num <=7;$num++)
{
my `$myvar_$num`;
}
Apr 21 '07 #2
savanm
85
Hi,

I cant understand ur need,

Dynamic array means inserting the elements into the array at runtime,

Please show ur code, nd tel ur need briefly
Apr 21 '07 #3
KevinADC
4,059 Expert 2GB
hi all,
how to create arrays like this using for loop

my @array_1
my @array_2
my @array_3
my @array_4
my @array_5
my @array_6
my @array_7
my @array_8
my @array_9


please tell me.
You don't want to do that. Use a hash:

Expand|Select|Wrap|Line Numbers
  1. my %hash = (
  2.    1 => values,
  3.    2 => values,
  4.    3 => values,
  5. );
the values can be arrays if thats what you need.
Apr 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Robert Oschler | last post by:
Hello, I am a Python newbie (by experience, not chronologically :) ), so if any of this doesn't make sense my apologies in advance. I am reading the chapter in The Python Cookbook on databases...
2
by: David Elliott | last post by:
I can create this: ?xml version="1.0" standalone="yes" ?> <ConfigOpt> <record> <Field_1>Text # 1</Field_1> <Field_2>Text # 2</Field_2> </record> </ConfigOpt>
3
by: Null | last post by:
Hello -- I am looking for a way to dynamically generate PDF documents - combining Crystal Reports and data driven "fields". For example, I have a template that's essentially a summary document...
4
by: vertigo | last post by:
Hello I need to create some objects durring program execution - but it's names are dynamically generated (depends on parameters). How can i do it ? Thanx Michal
7
by: pmclinn | last post by:
I was wondering if it is possible to dynamically create a structure. Something like this: public sub main sql = "Select Col1, Col2 from Table a" dim al as new arraylist al =...
4
by: jesper_lofgren | last post by:
Hi there, I have some webcontrols that i want to add dynamically on a page. I have stored the path / namespace in database (ex MyNameSpace.WebControls.Control1) to the class/webcontrol. Lets...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
2
by: nanabuch | last post by:
Hello, I posted yesterday a very complex question, but I did not receive a adequate answer so I decided to simplify things, and I will try to figure out the rest of the problem :). Ok, I need...
0
by: kurtf | last post by:
Hope somebody could help me with the creation of a table in sqlite3 from python. I am developing an application that allows a user to import a data file and insert the data into a sqlite3...
8
by: Paul H | last post by:
I want to base a form on a crosstab query. The query shows statistics for a user defined period. The column headings will look something like this: ClientID Month01 Month02 Month03 etc.. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.