Bart Lateur <[EMAIL PROTECTED]> writes: > The place where it would be put, would be irrelevant. > > sub readit { > POST { > close F; > } > open F, "< $f" ... > scalar(<F>) > } Would the POST be executed if the open fails? Why? Why not? sub readit { POST { close F; } open F, "< $f" or die; scalar(<F>) } But I think this is getting ridiculous. $slightly_joking++; I'd propose a much nicer and cleaner concept: sub readit { open F ... ; prog1 { scalar(<F>); close F; } } 'prog1' executes all expressions in the block, and returns the result of the first expression. Of course, we also need prog2, prog3, and so on ... $slightly_joking--; All that POST and such do, is obfuscate the flow of control. I doubt that outweighs the small benefits. -- Johan
- Re: POST blocks (like END, but... David L. Nicol
- Re: POST blocks (like END, but... Nicholas Clark
- Re: POST blocks (like END, but... Bart Lateur
- Re: POST blocks (like END, but... John Porter
- Re: POST blocks (like END, but... John Porter
- Re: assign to magic name-of-fu... Glenn Linderman
- Re: assign to magic name-of-functi... Glenn Linderman
- Re: assign to magic name-of-functi... Johan Vromans
- Re: assign to magic name-of-function va... Jarkko Hietaniemi
- Re: assign to magic name-of-function variab... Bart Lateur
- Re: assign to magic name-of-function va... Johan Vromans
- Re: assign to magic name-of-functi... John Porter
- Re: assign to magic name-of-functi... Ariel Scolnicov
- more POST recitation David L. Nicol
- Re: more POST recitation Ken Fox
- Re: assign to magic name-of-function variable instead of... Branden