Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: poll ideas quest 2009

by zentara (Archbishop)
on Jan 08, 2009 at 16:10 UTC ( #734934=note: print w/replies, xml ) Need Help??


in reply to Re: poll ideas quest 2009
in thread poll ideas quest 2009

looks like my poll idea has generated alot of interest. How about
system( "cat $0 > /dev/null");

I'm not really a human, but I play one on earth Remember How Lucky You Are

Replies are listed 'Best First'.
Re^3: poll ideas quest 2009
by shmem (Chancellor) on May 05, 2009 at 18:47 UTC

    Eh, no. Useless use of cat.

    system "cat /dev/null > $0" or exec $0; die or die; # just to be sure

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://734934]
help
Chatterbox?
[Dumu]: ambrus: it's about testing a file for being multiple possible file formats
[ambrus]: In particular, you might want to detect the encoding of a HTML file from between utf-16 versus ascii-based and encoding given in a META tag.
[ambrus]: Dumu: it should probably be safe to change the encoding if you rewind first with seek $file, 0, 0 first
[Dumu]: ambrus: good guess. I'm trying to contribute to a CPAN module, and the existing tests assume they're looking at text files
[Dumu]: ambrus: thank you. I was seeking afterwards. I'll seek first.
[jedikaiti]: Hello, Dumu!
[Dumu]: hello again jedikaiti! thanks everyone today for being in the monastery!

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2017-11-20 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (291 votes). Check out past polls.

    Notices?