public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Isuue by using Perl binary mode
@ 2014-04-14 12:33 Kptain
  2014-04-14 23:20 ` Andrey Repin
  0 siblings, 1 reply; 2+ messages in thread
From: Kptain @ 2014-04-14 12:33 UTC (permalink / raw)
  To: cygwin


Hi all,

I'm facing some issues after modifying files with Perl (5.14.2) in binary
mode.

I need to remove "../" from path available in binary files.
But after executing scripts it seems that file is no more readable by
application.

Do you have some recommandations to provide me in order to do these
modifications?

Thanks in advance,



--
View this message in context: http://cygwin.1069669.n5.nabble.com/Isuue-by-using-Perl-binary-mode-tp107875.html
Sent from the Cygwin list mailing list archive at Nabble.com.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Isuue by using Perl binary mode
  2014-04-14 12:33 Isuue by using Perl binary mode Kptain
@ 2014-04-14 23:20 ` Andrey Repin
  0 siblings, 0 replies; 2+ messages in thread
From: Andrey Repin @ 2014-04-14 23:20 UTC (permalink / raw)
  To: Kptain, cygwin

Greetings, Kptain!

> I'm facing some issues after modifying files with Perl (5.14.2) in binary
> mode.

> I need to remove "../" from path available in binary files.
> But after executing scripts it seems that file is no more readable by
> application.

od -t x1 -N $(( 16*16 )) -- yourfile

And compare dumps before and after your script execution.
Keep in mind, that, if the application in question is a something completely
unrelated to your scripts, or even Cygwin in general, you're looking at the
possibility of being in need to completely reconstruct the file format before
being able to successfully edit the file.

> Do you have some recommandations to provide me in order to do these
> modifications?

Doubt this is the right mailing list for education in programming languages.
Search the web for <your favorite language> survival guide.
There's tons of it available for Perl, SED, AWK...


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 15.04.2014, <03:10>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-14 23:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-14 12:33 Isuue by using Perl binary mode Kptain
2014-04-14 23:20 ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).