Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 browsing the Monastery: (5)
As of 2015-07-04 03:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls