Ken & Karthik,
The same algorithm has worked for me even when I use subroutines to
push in the value to the variable in the foreach loop(which is in the calling
program). I really
doubt the
modularity of my program. I am now combining two of my
programs (one with no subroutine and other well organised), the bad design
might cause it to behave improperly?? I am doing many memory intensive
operations with arrays (like reading a file and shuffling the lines). I would
try with different architectures and let you know the status.
i think this would take me two days (since I am not working on it full time!! & the
program is
becomming big).
Thanks for your interests,
Naren.
Ken wrote:
> When I remove the incomplete elsif this runs fine on my system (with an
> added line before the while to read in @line <code>@line =
> scalar(<STDIN>);</code>)
>
> What version of Perl are you running? Did you install it? Did it past all
> of the tests?
>
> Can you send us a complete sample program that gives this same error?
>
> Ken
>
> ----- Original Message -----
> From: "Narendran Kumaraguru Nathan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 31, 2001 5:09 AM
> Subject: cannot fix an error - "Bus error (core dumped) "
>
> > 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]
> >
> >
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]