Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Distinguish between HTML and Plain text

by Khen1950fx (Canon)
on Sep 27, 2011 at 02:24 UTC ( #928000=note: print w/replies, xml ) Need Help??

in reply to Distinguish between HTML and Plain text

It can be done. Is it precise? You be the judge:
#!/usr/bin/perl -l use strict; use warnings; use Text::FromAny; my $log = '/root/Desktop/text.log'; open STDOUT, '>', $log; my $entries= "<TITLE>Page 7</TITLE>"; print $entries; my $tFromAny = Text::FromAny->new(file => $log); print $tFromAny->detectedType; close STDOUT;
Instead of thinking "can't", think "don't do that". It works, but it's not best practice.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928000]
[atcroft]: stevieb: I have berrybrew installed on a Win machine, and I noticed that with perlbrew you can "upgrade" a particular installed version... any chance of doing something similar in the
[atcroft]: future with berrybrew?
[atcroft]: stevieb: Also, one other odd question... is it possible to set it up so that all the versions installed can use a single directory that they pull module sources into, rather than duplicating files? (Am I making sense, or do I have too high a CBC
[atcroft]: (caffeine-blood content) atm?)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2017-04-29 05:11 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (531 votes). Check out past polls.