Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: neat little win32 freeware utility

by MrNobo1024 (Hermit)
on Sep 13, 2001 at 18:59 UTC ( #112204=note: print w/replies, xml ) Need Help??

in reply to neat little win32 freeware utility

Unfortunately, it's impossible to parse Perl code, and therefore also impossible to (reliably) highlight it. Consider this snippet:
BEGIN { if(time % 2) { eval 'sub foo(){}' } else { eval 'sub foo($){}' + } } foo /1; # is this a comment or not? /;
The "comment" is only a comment if the time the program was run was an odd number.

-- MrNobo1024


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://112204]
[Corion]: gnosti: I would cheat and use my approach instead of dealing with durations as objects, or a module
[Corion]: You could even do the calculation directly - my $duration = $H * 3600+ $M*60 + $S; strftime '%H:%M:%S', timelocal($duratio n)
[Corion]: (and that strftime call is largely superfluous too, converting back to H:M:S isn't hard either)
[gnosti]: Corion: Thanks. Going to seconds, then back to H:M:S using strftime looks good.

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-08-18 09:02 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (297 votes). Check out past polls.