×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Modifying pcl file

Modifying pcl file

Modifying pcl file

(OP)
Hi

What i am trying to achieve is to open a pcl file in a perl script find certain text, set as variable and replace another string with this variable. Works fine so far as all the find replace is working.

The only problem is that when i write out to the same pcl file there is a slight difference between the input file and the output file, so the printout is wrong and contains rogue characters.

Anybody have any suggestions as how to fix this issue?
I appreciate you taking the time to have a think!
 

RE: Modifying pcl file

My guess would be that the editing process needs to be put into a binary mode or something.

But really, you first need to save a copy of the file, process it and then compare the two files very closely and just see the exact differences.

Is the new file larger or smaller that can't be accounted for by actions in you Perl script.

Unix?

Jim Asman
http://www.spectracolorservices.com

RE: Modifying pcl file

(OP)
The difference between the two files is minimal, it may be just that a string in the middle of a line is two tabs more to the right.. just frustrating things like that.

The files are exactly the same size.  

RE: Modifying pcl file

But byte by byte what is the difference from what you expected?

If the files are the same size, then have bytes then been replaced in error?
 

Jim Asman
http://www.spectracolorservices.com

RE: Modifying pcl file

Often, an editor will replace spaces with tabs or tabs with spaces according to its interpretation of tab positions.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close