Fun Perl question

Richard Foley Richard.Foley at rfi.net
Tue Feb 19 15:58:51 GMT 2008


On Tuesday 19 February 2008 16:04, Peter Corlett wrote:
> So there's me with this bit of code that's running a bit slow. I run the
> following command:
> 
>   perl -M:DProf ./test.pl
> 
> and then follow it with dproffpp to see the results. I'm then left
> scratching my head to work out why I've got "Unable to open tmon.out" before
> spotting my silly mistake.
> 
perl -d:DProf ...

> The fun question is: why did the original command seem to work?
> 
perl -MDProf should have blown up with a no such module error.

perl -M:DProf appears to have ignored the -M argument (:DProf) entirely, 
probably because of the leading colon...

> (I've already worked out the answer, by the way, but it might be an amusing
> puzzle for somebody else.)
> 
Go on, put us out of our misery.

-- 
Richard Foley
Ciao - shorter than aufwiedersehen

http://www.rfi.net/


More information about the london.pm mailing list