Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-08-01 22:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (50 votes), past polls