Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: my $variable with &&do{} doesn't compile

by Tanalis (Curate)
on May 26, 2003 at 09:06 UTC ( [id://260801]=note: print w/replies, xml ) Need Help??


in reply to my $variable with &&do{} doesn't compile

The way I understand this is that in the first instance, you're creating the $epoch variable before it's used within the expression.

In the second example, however, you create the variable at the same time as you attempt to use it. As the variable doesn't exist until after the statement is executed (which doesn't happen until the compiler hits the semi-colon), it's not possible to pass it into a function within that statement.

I will point out that I'm not 100% sure about this, though - this is based on someone else's attempt at explaining a similar problem to me.

Hope that helps ..

-- Foxcub
#include www.liquidfusion.org.uk

Replies are listed 'Best First'.
Re: Re: my $variable with &&do{} doesn't compile
by Skeeve (Parson) on May 26, 2003 at 09:15 UTC
    See below. You can be sure ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2024-04-19 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found