Rodrick Brown wrote:
my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
I have no problem returning single elements but how would one walk this list
of elements with say a for loop?
One way:
my $level = 0;
breakdown( $arrayRef );
sub breakdown {
my $ref = shift;
On Fri, Jun 6, 2008 at 9:31 PM, Rodrick Brown <[EMAIL PROTECTED]> wrote:
> my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
>
> I have no problem returning single elements but how would one walk this list
> of elements with say a for loop?
>
You can treat an array reference like an array by
On Sat, Jun 7, 2008 at 9:31 AM, Rodrick Brown <[EMAIL PROTECTED]> wrote:
> my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
>
> I have no problem returning single elements but how would one walk this list
> of elements with say a for loop?
>
Try this code:
use strict;
my $arrayRef = [ 1,
my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
I have no problem returning single elements but how would one walk this list
of elements with say a for loop?
Gunnar Hjalmarsson wrote:
close $out;
I was just going over this... but shouldn't it be
print $out "# Add this line to the top\n"; # ??? or did I miss
something?
I think you are right. I'd suggest that you send a note to Brian d'Foy
([EMAIL PROTECTED]), who is maintaining the FAQ.
Richard Lee wrote:
Gunnar Hjalmarsson wrote:
perldoc -q "insert a line"
Within that basic form, add the parts that you need to insert, change,
or delete lines.
To prepend lines to the beginning, print those lines before you enter
the loop that prints the existing lines.
open my $
Hi Arun
You didn't say what you really wanted to achieve. Do yo want to dabble and
learn from that experience what using network modules is all about ?
--
Andrew
Edinburgh,Scotland
On Fri, 6 Jun 2008, Arun wrote:
Hi,
This is Arun here, i am new to Perl so i
was just thinking of programming
Gunwant Singh wrote:
Hi,
Hello,
Let me thank you for your help. I think you guys are doing a great work, its
really appreciative.
Thanks to David and John. Now that I changed my *"perl"* code to the
following, its actually working
*use strict;
use warnings;
use File::stat;
opendir (DH,
On Fri, Jun 6, 2008 at 11:32 AM, Richard Lee <[EMAIL PROTECTED]> wrote:
> zentara wrote:
>
> I was just listening to podcasting and I heard Chad Fowler("my job went to
> india: 52 ways to save your job) talking about programming language
> in general.
> One of the quotes he says that I felt like it
Michelle Konzack wrote:
Hello,
Hello,
I have a similar problem but with "mode" which output weird permissions:
[ '~/bin/.perl_test_001' ]--
#!/usr/bin/perl
use strict;
use warnings;
use File::stat;
opendir(DH, "/home/michelle.konzack/bin") || die
Hi,
Let me thank you for your help. I think you guys are doing a great work, its
really appreciative.
Thanks to David and John. Now that I changed my *"perl"* code to the
following, its actually working
*use strict;
use warnings;
use File::stat;
opendir (DH, "subcode") or die "$!";
chdir("C:
yitzle wrote:
>
> 1) If you are interested in learning to program for the sake of
> programming (vs getting XYZ done), Perl probably isn't the best first
> choice. (Not that its the last choice or anything, but not first.) I'd
> personally advocate C/C++ or maybe Java. Maybe make Perl a third
> cho
zentara wrote:
On Thu, 05 Jun 2008 21:16:42 -0400, [EMAIL PROTECTED] (Richard Lee)
wrote:
Most likely just out of curiosity factor, I picked up a book "Learning
to program " the facets of ruby series..
See what some experienced Perl programmers say about Ruby
http://perlmonks.org?node
On Fri, Jun 6, 2008 at 7:29 PM, Arun <[EMAIL PROTECTED]> wrote:
> Hi,
> This is Arun here, i am new to Perl so i
> was just thinking of programming the TCP apllications or working. So
> how do i do that, just needed guidance from you.
>
Licoln Stein's book "Network Programming with Perl" is great
Arun wrote:
> Hi,
> This is Arun here, i am new to Perl so i
> was just thinking of programming the TCP apllications or working. So
> how do i do that, just needed guidance from you.
A lot depends on how you want to use TCP, but take a look at
perldoc -f socket
and
perldoc Socket
HTH,
Ro
Hi,
This is Arun here, i am new to Perl so i
was just thinking of programming the TCP apllications or working. So
how do i do that, just needed guidance from you.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I want to be able to tag a module with one or more tags that can be tested for
after requiring it.
require 'module';
Any ideas on the best way to accomplish this?
Thanks in advance
From: "Dr.Ruud" <[EMAIL PROTECTED]>> Octavian:
>> Yitzle:
>
>>> 1) If you are interested in learning to program for the sake of
>>> programming (vs getting XYZ done), Perl probably isn't the best first
>>> choice. (Not that its the last choice or anything, but not first.)
>>> I'd personally advoca
18 matches
Mail list logo