Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: After i made the script of commenting out lines , it starts to make bugs :S <<HELP!>>

by Corion (Patriarch)
on Oct 07, 2007 at 16:58 UTC ( [id://643297]=note: print w/replies, xml ) Need Help??


in reply to After i made the script of commenting out lines , it starts to make bugs :S <<HELP!>>

What have you done so far to debug this problem?

The spaces come because you do:

print HAN "@array";

And that's just what Perl does. When you print an array, Perl inserts $" between the array elements. And $" is set to a space by default. Read perlvar and maybe do:

local $" = "";

before printing. Or print line by line:

print HAN $_ for @array;

@array is a very bad name for a list containing the lines of a file.

  • Comment on Re: After i made the script of commenting out lines , it starts to make bugs :S <<HELP!>>
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-16 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found