Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^7: dos2ux shows cannot open file if it is greater than 2GB size

by shan_emails (Beadle)
on Mar 19, 2013 at 14:36 UTC ( [id://1024312]=note: print w/replies, xml ) Need Help??


in reply to Re^6: dos2ux shows cannot open file if it is greater than 2GB size
in thread dos2ux shows cannot open file if it is greater than 2GB size

Hi

Thanks for your reply
In my input file CONTROL_M character's are found inside the line also.
When i try it by dos2ux it removed CONTROL_M character's inside line also.
And my concern is to remove only CONTROL_M character and not any other special characters.
Kindly advise how to proceed, also how to speed up the process by using below code.

$self->remove_controlM($infile); sub remove_controlM { my $self = shift; my $in_file = shift; my $out_file = $in_file . "controlM_removed"; open(my $FH_IN, '<', $in_file) or die "Failed to open $in_file $!\n +"; print "REMOVE CONTROL_M CHARACTER PROCESS STARTING"; open(my $FH_OUT, '>', $out_file) or die "Failed to write $out_file +$!\n"; while (<$FH_IN>) { s/\r//g; print($FH_OUT $_); } close ($FH_IN); close ($FH_OUT); unlink($in_file); `mv $out_file $in_file`; print "REMOVE CONTROL_M CHARACTER PROCESS ENDING"; }

Thanks,
Shanmugam A.

Replies are listed 'Best First'.
Re^8: dos2ux shows cannot open file if it is greater than 2GB size
by Anonymous Monk on Mar 19, 2013 at 15:15 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-19 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found