in reply to Re: Overwriting temp file
in thread Overwriting temp file
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Overwriting temp file
by Anonymous Monk on Sep 21, 2011 at 19:37 UTC | |
I would but it's large, I'll modify the code in the post. Well it doesn't have to be real live realsize data, it just has to match your regexes, ie
As you can see, the logic is sound, temp gets overwritten, pretty much what you already have Note the expected data doesn't match on purpose ;) | [reply] [d/l] |
by Jeri (Scribe) on Sep 21, 2011 at 20:30 UTC | |
Thanks Again. Works like I want it too! Seek was good idea. You're pretty brainy. Here's what I ended up using.
| [reply] [d/l] |
by Anonymous Monk on Sep 21, 2011 at 22:40 UTC | |
Seek was good idea. My demo program needed seek because I did not want to touch the filesystem, so I used in-memory filehandles, and passed the filehandle around You don't need to use seek, it does nothing for you | [reply] |
by Jeri (Scribe) on Sep 21, 2011 at 20:04 UTC | |
Thanks for replying so quickly. I'm not quite as advanced as you, and I understood most everything, except the following... my $outMode = '+>';Is the +> telling the file to move out? What is the '+' for? open my ($outFh), $outMode, $outputFile;Here, I know you open a filehandle and then there's the $outMode again (+>) and I'm assuming the name of the output file? $callBack->($outFh);I'm just confused here. not $flagI looked this up in perldocs. Does it return true if $flag = 0? I didn't mean to turn this into a tutoring session, but it would help me out so much if I understood it! You've been a great help so far.Thanks. | [reply] [d/l] [select] |
by Khen1950fx (Canon) on Sep 21, 2011 at 22:57 UTC | |
| [reply] |
by Jeri (Scribe) on Sep 22, 2011 at 14:07 UTC | |
If I don't use seek with the last code I posted, it still appends. | [reply] |
by Anonymous Monk on Sep 22, 2011 at 14:21 UTC | |
If I don't use seek with the last code I posted, it still appends. Its not that I don't believe you, but that is just not possible :) What does autodie say? | [reply] |