cpan you have to see

ian docherty londonperlmongers at
Wed Dec 12 17:30:12 GMT 2012

I was going to ask just one question 'why?', but then I thought back to my
dim and distant past and I remembered doing something very similar.

I was learning programming language 'B' after being fairly proficient (as I
thought at the time) in language 'A'.

I started writing macros and routines in 'B' to make it look more like 'A'.

Instead I should have embraced language 'B', written my code in the
'approved' style rather than a bastardised version trying to emulate

It turned out it was neither cool, useful or sensible. It stopped me
embracing the new language, my code was unreadable both by anyone who knew
'A' or 'B' and was unmaintainable.

I suggest that you forget this approach, I can't see it helping anyone
(especially yourself). There are many ways to do what you want in Perl,
here are just a couple.

while(1) {
    # do something
    sleep 5;
    last if $all_done;

my $working = 1;
while ($working) {
    # do something
    sleep 5;
    $working = 0 if $all_done;

And numerous variations.

On 12 December 2012 17:05, Alexej Magura <perlook at> wrote:

> Okay, allow me to clarify what the TrueFalse module that I wrote is trying
> to emulate.  It's trying to emulate the 'true' and 'false' user commands
> available under Linux.
> Haven't you ever done something like this in Unix Shell?
> while true; do ls /var/log/; sleep 5s; clear; done
> The statment 'true' in this example, as far as I know, only returns true
> and that's it.  It may not look very useful, but it can be useful when
> you just need to do something and just want to write 'Just because I
> said so, keep doing A until I say stop.'
> I'm sorry if all of you think that my modules are poorly written, but if
> you want me to take you seriously, then say something productive for a
> change, that is make some suggestions (I'm open to suggestions.)

More information about the mailing list