in reply to while or for?

What code do you have so far? Is that your input or the desired output?

Replies are listed 'Best First'.
Re^2: while or for?
by Anonymous Monk on Dec 30, 2008 at 04:57 UTC
    the program i have written is open(FH,"input.txt") or die "cant open"; @array=<FH>; foreach(@array){ if($_!=~m/^>/) { $_=~s/\n//g; print "$_\n"; } } the desired result is #PLOT1 a b c d f g i a c g s h b h f d #PLOT2 b g d i s e w d u b a o n i o p w q c u s t r r y #PLOT3 e r t d v g v g b
      if($_!=~m/^>/)
      I don't see any ">" characters in your input. What do you expect the line above to do (also, the "not matches" operator is "!~", not "!=~")?
        sorry...its a # and not >