Re: Modules for printing the content of an array
Mumia W. a écrit : On 10/11/2006 10:42 AM, Sami FANTAR wrote: [...] I have read the Data::Dumper related doc. Including the part where it tells you how to substitute the correct variable names for $VAR1,$VAR2,... ? But, after having written your example, the output seems quite weird. I got $VAR1,$VAR2, and so on. Is it possible to personalize this output? use Data::Dumper; my @myarray = qw(blah blahblah blllah); print Data::Dumper-Dump([EMAIL PROTECTED],[qw(myarray)]); WARNING: UNTESTED CODE Thanks for your help and your solutions. I found what I was looking for. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Modules for printing the content of an array
Hi Sami, Yes Data::Dumper is your friend when it comes to dumping data (how strange is that :-) Simply do this in your perl script: *use Data::Dumper;* *print Dumper @huge_array;* And be amazed ;-) On 10/11/06, Sami FANTAR [EMAIL PROTECTED] wrote: Hello everybody I would like to know if there is any module which can display in a enjoyable way the content of an array with about 200 values. Could Data::Dumper be a solution for my problem? Any help or example will be very appreciated. Thanks in advance. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Modules for printing the content of an array
Rob Coops a écrit : Hi Sami, Yes Data::Dumper is your friend when it comes to dumping data (how strange is that :-) Simply do this in your perl script: *use Data::Dumper;* *print Dumper @huge_array;* And be amazed ;-) On 10/11/06, Sami FANTAR [EMAIL PROTECTED] wrote: Hello everybody I would like to know if there is any module which can display in a enjoyable way the content of an array with about 200 values. Could Data::Dumper be a solution for my problem? Any help or example will be very appreciated. Thanks in advance. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response What do you mean by dumping data? I have read the Data::Dumper related doc. But, after having written your example, the output seems quite weird. I got $VAR1,$VAR2, and so on. Is it possible to personalize this output? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: Modules for printing the content of an array
Rob Coops wrote: : Simply do this in your perl script: : *use Data::Dumper;* : *print Dumper @huge_array;* For the archives: Those asterisks (*) are for emphasis. They are not actually in the code. Arrays and hashes can also be dumped using a reference. I find a reference more aesthetically pleasing. use Data::Dumper 'Dumper'; print Dumper [EMAIL PROTECTED]; HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Market Advocate Web Programmer 254 968-8328 Don't tread on my bandwidth. Trim your posts. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Modules for printing the content of an array
On 10/11/2006 10:42 AM, Sami FANTAR wrote: [...] I have read the Data::Dumper related doc. Including the part where it tells you how to substitute the correct variable names for $VAR1,$VAR2,... ? But, after having written your example, the output seems quite weird. I got $VAR1,$VAR2, and so on. Is it possible to personalize this output? use Data::Dumper; my @myarray = qw(blah blahblah blllah); print Data::Dumper-Dump([EMAIL PROTECTED],[qw(myarray)]); WARNING: UNTESTED CODE -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response