Lightning flashed, thunder crashed and Narendran Kumaraguru Nathan <naren@india
.ti.com> whispered:
| Now, the way I have implemented  is below
| foreach (@line) {
|     if ( $_ =~ /\.\./) {  # if the input has two consecutive .'s
|      ($s, $e) = split /\.\./, $_;  # split with the dots to get start and end
|      push @line, $s;  # append to the input line
|      while ( $s <= $e ) { push @line, $s++; };
|     }elsif ($_ ==      #  next comparison
|         # specify to execute commands some input
| }

Without seeing all your code, it is difficult to really say what exactly is
happening.  The first thing I see here is that your code is incomplete:

}elsif ($_ ==

That would cause major problems right there.

The second thing I notice is that you are modifying the array @line inside
the loop.  That is certain to confuse the parser.  You may need to rethink
how you are doing this so that you don't have to modify the array inside
the loop.

-spp
--
Stephen P Potter                                         [EMAIL PROTECTED]
"You can't just magically invoke Larry and expect that to prove your point.
Or prove that you have a point."        -Simon Cozens
UNIX, Perl, PHP, Web Consulting and Training  http://www.unixlabs.net/~spp/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to