Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: A Strange print() predicament.

by Zaxo (Archbishop)
on Feb 20, 2003 at 01:19 UTC ( #236931=note: print w/ replies, xml ) Need Help??


in reply to A Strange print() predicament.

Here's a real direct way to do it:

{ my $variable_for_file = 'moose'; local *CORE::GLOBAL::print = sub {1}; local *CORE::GLOBAL::printf = sub {1}; do file.inc; }
That temporarily overrides perl's builtin print and printf with a no-op.

Update: This doesn't work - peer into the future and see !Overriding Builtin print.

After Compline,
Zaxo


Comment on Re: A Strange print() predicament.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2014-12-25 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls