Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: matching datetimestamps and concatenating data where timestamps match from multiple large datafiles

by CountZero (Bishop)
on Sep 22, 2013 at 13:57 UTC ( [id://1055184]=note: print w/replies, xml ) Need Help??


in reply to Re: matching datetimestamps and concatenating data where timestamps match from multiple large datafiles
in thread matching datetimestamps and concatenating data where timestamps match from multiple large datafiles

Did you try your code?

One cannot use next or last inside a do { ... } block. As the docs say : "contrary to popular belief do{} blocks, which do NOT count as loops".

It is not a loop, so you cannot use loop-control commands. You can double the curly braces and put a bare block inside the do { ... } block. Bare blocks are loops that execute once. The loop-control commands will work ... somewhat, but last will not do as you might expect: it will exit the inner (bare) block, only to fall into the outer (do) block and hence has the same effect as next.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics
  • Comment on Re^2: matching datetimestamps and concatenating data where timestamps match from multiple large datafiles
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: matching datetimestamps and concatenating data where timestamps match from multiple large datafiles
by hdb (Monsignor) on Sep 22, 2013 at 14:06 UTC

    I did not try my code as it is only a sketch of how to start.

    Thanks for pointing out this flaw, I was not aware of it. I did put the while at end to avoid the duplicate checking of the times. You have solved this directly in your code by adding another check.

      Yes, the duplicate checks do not make me very happy, but I cannot see another easy way out.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-20 01:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found