Hai Guys,

  I am compiling a perl code (arround 200 lines). I run it with perl -w (so that I can 
see all the
warnings). It
reports no warnings and executes. All is fine till I give one input ( like 1..5 ) 
meaning that I
need actions 1 to 5
to be done. Atonce the following error is printed in the screen and the program quits.
error>> Bus error (core dumped)

  The user can specify a command or a series of command if the input is >1 then only 
one command
(for 1)
is executed. if the input is >1 2 , then execution of 2 follows execution of 1 . If 
the input is
>1..5 , then
I wish actions 1 to 5 to be executed one after another.

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
}

Can anyone give me a clue why this happens?? Or is there a better way of doing this?
Thanks & Regards,
Naren.


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

Reply via email to