Help me to continue

Newbie Member
1May2009,13:52   #1
priyasub's Avatar
i need a help in executing a for loop... the output should be in the form as below
1
12
123
1234
how to do it..
im new to learn PERL Language..
help me
Newbie Member
1May2009,13:52   #2
priyasub's Avatar
i need a help in executing a for loop... the output should be in the form as below

1234
123
12
1


how to do it..
im new to learn PERL language
Team Leader
12May2009,17:48   #3
pradeep's Avatar
Code: Perl
#/usr/bin/perl

for my $a (1..9)
{
  print $_ for(1..$a);
  print "\n";
}

for(my $i=9;$i>0;$i--)
{
  for(my $j=1;$j<$i;$j++)
  {
    print $j;
  }
  print "\n";
}

Btw, which programming language do you know?