Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^3: Missing \t in print output

by Anonymous Monk
on Jul 15, 2015 at 11:56 UTC ( #1134860=note: print w/replies, xml ) Need Help??

in reply to Re^2: Missing \t in print output
in thread Missing \t in print output

I see. You're saying the example output shows only middle parts of lines. Well...

Thinking logically, there are four possibilities:

  1. Bug in your program
  2. Bug in your tool that you use to view the output file
  3. Bug in Perl
  4. User error
  1. I don't see any apparent bugs in the snippet you provided. Although some things are strange, for example, if ($nbGABlocks == 0) {... doesn't seem to have any effect, since @arrayToPrint is emptied before appending more elements anyway (in the NORMALBLOCK loop). Bugs are not impossible, but they must be somewhere else...
  2. How are you viewing the file?
  3. That kind of bug in Perl seems unlikely... What is the Perl version?
  4. Yeah, how are you viewing the file? For example, you're opening the file for appending, are you making sure you're viewing the new part and not the old one?
There is a number of 'paste your code here' sites on the Internet, e.g. Would it be possible to paste the output of Data::Dumper and of your program using it or a similar site? And more of your script, too (ideally something that we could actually run).

Replies are listed 'Best First'.
Re^4: Missing \t in print output
by Sophienz (Acolyte) on Jul 15, 2015 at 12:58 UTC

    I will test it further but I think number 2. (and 4.!) in your list may have been the problem.

    I was viewing the output in two ways, both through the terminal. Either I was printing to STDOUT and looking at the output directly, or printing it to a file (after removing it) and calling the Unix head method on it. Both gave me the missing \t problem.

    I've now tried to copy the file locally and open it with TextWrangler and TextEdit, and that seems to give the required output. Thank you for your suggestion.

    I was using Perl 5.14.

Re^4: Missing \t in print output
by Anonymous Monk on Jul 15, 2015 at 12:07 UTC
    Come to think of it, there is also a possibility of 'hardware failure'... If all else fails, that might also be worth investigating.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1134860]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2021-01-23 12:07 GMT
Find Nodes?
    Voting Booth?