Multidimensional array / Passing an array to a sub

2006-07-30 Thread Martin Tournoij
I'm currently massivly confused by multidimensional arrays and passing arrays to subs. Why is it that @_[1] isn't properly copied to @a? I'm not sure what exactly I'm doing wrong here, probably something simple, but I can't find anything that works in the manpages or on the site... Music($

RE: Multidimensional array / Passing an array to a sub

2006-07-30 Thread Charles K. Clarkson
Martin Tournoij wrote: : I'm currently massivly confused by multidimensional arrays and : passing arrays to subs. : : Why is it that @_[1] isn't properly copied to @a? It is properly copied. Because @_[1] one is a scalar and @a is an array the reference to the passed array in stored in $a[0]

Re: Multidimensional array / Passing an array to a sub

2006-07-30 Thread John W. Krahn
Martin Tournoij wrote: > I'm currently massivly confused by multidimensional arrays and passing > arrays to subs. > > Why is it that @_[1] isn't properly copied to @a? > > I'm not sure what exactly I'm doing wrong here, probably something > simple, but I can't find anything that works in the ma

RE: Dynamically choosing CGI file based on form output

2006-07-30 Thread Charles K. Clarkson
Mike Martin wrote: : I am trying not to go this route because I want to keep the : subsidiary files as self-contained as possible : : There are four files at present which are around 600 lines, : which I think is a sensible size. These all do a specific job : which can be linked together. : : It

Re: debugging Perl with the Eclipse IDE

2006-07-30 Thread Robert Hicks
http://www-128.ibm.com/developerworks/edu/os-dw-os-epic-i.html?S_TACT=105AGX44&S_CMP=ECL That is a debugging tutorial off the EPIC site. Maybe it has an answer in there somewhere. Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Returning Values fr nested FOR w/o RETURNing fr sub

2006-07-30 Thread Alex Gill
push @powers, 2**$_ for 0..7; sub bases { for (@_) { sprintf ("%08b", $_). sprintf ("%4d", $_). sprintf ("%4o", $_). sprintf ("%4X", $_). "\n"; } } print bases @powers; -- I'm learning

RE: Returning Values fr nested FOR w/o RETURNing fr sub

2006-07-30 Thread Jeff Peng
for (@_) { sprintf ("%08b", $_). sprintf ("%4d", $_). sprintf ("%4o", $_). sprintf ("%4X", $_). "\n"; } Would you maybe use 'printf' instead of 'sprintf' above? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Returning Values fr nested FOR w/o RETURNing fr sub

2006-07-30 Thread Charles K. Clarkson
Alex Gill wrote: : My question is: : How can the 'for' loop within bases() output a list for 'print' : as invoked in the last line of code? It can't. You'll have to wait until the loop finishes unless you print directly from the loop which is less robust. my @powers; push @powers, 2 ** $_ for

Re: Returning Values fr nested FOR w/o RETURNing fr sub

2006-07-30 Thread John W. Krahn
Alex Gill wrote: > push @powers, 2**$_ for 0..7; > > sub bases { > for (@_) { > sprintf ("%08b", $_). > sprintf ("%4d", $_). > sprintf ("%4o", $_). > sprintf ("%4X", $_). > "\n"; > } > } > > print bases @powers; >

Major Applications of Perl

2006-07-30 Thread Sastry
Hi We know that Perl is used for various puposes including text manipulation,file maintenance and automation of system administration. It is also popular for CGI programming on the web owing to its inherent ability to process text. "It is highly adaptable and intended to be easy to use and efficie

RE: Major Applications of Perl

2006-07-30 Thread Toby Stuart
> -Original Message- > From: Sastry [mailto:[EMAIL PROTECTED] > Sent: Monday, 31 July 2006 4:21 PM > To: beginners@perl.org > Subject: Major Applications of Perl > > > Hi > We know that Perl is used for various puposes including text > manipulation,file maintenance and automation of sys