in reply to Re^2: array of strings that matched a pattern
in thread array of strings that matched a pattern

Buffering?

Throw a print "\n"; after the print join and see if it works (you probably didn't want the results from each line butted up against each other anyhow)

You may want to set $|=1 at the start too, if you haven't already.

I'm looking at Pro Perl by Peter Wainwright, and it indicates that:

1) setting $| or

2) using the autoflush method, if using IO::File or IO::Handle or

3) printing to a terminal (not sure how perl sees your IDE)

turns off block buffering, but line buffering is still active. I'd think terminating the line should guarantee a flush.

-Greg

Replies are listed 'Best First'.
Re^4: array of strings that matched a pattern
by Anonymous Monk on Apr 29, 2011 at 21:38 UTC
    That's by fault for not posting properly - i did actually have a \n at the end of the line. It was eclipse that was the problem - was fine from command line. I didn't think of it being a problem with eclipse. I assumed it was me :) Thank-you