[29840] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1083 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 30 16:09:43 2007

Date: Fri, 30 Nov 2007 13:09:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 30 Nov 2007     Volume: 11 Number: 1083

Today's topics:
        East european characters from LaTex to UTF8 <francois.rappaz@unifr.ch>
    Re: East european characters from LaTex to UTF8 <joost@zeekat.nl>
    Re: East european characters from LaTex to UTF8 <joost@zeekat.nl>
        Net::SSH::Perl security question <zhilianghu@gmail.com>
    Re: Net::SSH::Perl security question <glex_no-spam@qwest-spam-no.invalid>
    Re: Net::SSH::Perl security question <m@rtij.nl.invlalid>
        OT raibow <stoupa@practisoft.cz>
    Re: OT raibow <joost@zeekat.nl>
    Re: OT raibow <ben@morrow.me.uk>
        Perl and a Ramdisk <bill@ts1000.us>
    Re: Perl and a Ramdisk <smallpond@juno.com>
    Re: Perl and a Ramdisk <bill@ts1000.us>
    Re: retrieving news messages <bik.mido@tiscalinet.it>
    Re: Sorted Hash <sfandino@yahoo.com>
    Re: Sorted Hash <bugbear@trim_papermule.co.uk_trim>
    Re: Sorted Hash <1usa@llenroc.ude.invalid>
    Re: Sorted Hash <damian@tvk.rwth-aachen.de>
        Why is a perl script 'sleep 100' uses 100 MEGS of RAM <ignoramus22774@NOSPAM.22774.invalid>
    Re: Why is a perl script 'sleep 100' uses 100 MEGS of R <smallpond@juno.com>
    Re: writing to a notepad in perl (hymie!)
    Re: writing to a notepad in perl <RedGrittyBrick@SpamWeary.foo>
    Re: writing to a notepad in perl <RedGrittyBrick@SpamWeary.foo>
    Re: writing to a notepad in perl <bik.mido@tiscalinet.it>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 30 Nov 2007 08:11:12 -0800 (PST)
From: Francois <francois.rappaz@unifr.ch>
Subject: East european characters from LaTex to UTF8
Message-Id: <7f1ca392-45d5-4668-bff6-5386210b9d27@e67g2000hsc.googlegroups.com>

Hi
With the module TeX::Encode and Encode, I convert characters from
LaTex to UTF8. It works great except for characters use in Slovacia,
for example c or z with caron: =E8 =BE

TeX::Encode use the followings modules
use Encode::Encoding;
use Pod::LaTeX;
use HTML::Entities

and from the comments in TeX::Encode "It uses the  the mapping from
Pod::LaTeX, but we use HTML::Entities
to get the Unicode character".
Is there another module I should install to convert these east
european characters ?
Thanks for any advice !

Francois


------------------------------

Date: 30 Nov 2007 19:33:01 GMT
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: East european characters from LaTex to UTF8
Message-Id: <4750656d$0$18641$e4fe514c@dreader28.news.xs4all.nl>

On Fri, 30 Nov 2007 08:11:12 -0800, Francois wrote:

> Hi
> With the module TeX::Encode and Encode, I convert characters from LaTex
> to UTF8. It works great except for characters use in Slovacia, for
> example c or z with caron: č ž

Which encoding are your original latex files? Plain 7bit ASCII or 
ISO-8859-1 with latex markup for the special characters or something else?

If something else, it may help to open/read the latex files using the 
right "lower level" encoding layer, for example, if you're using cp1250 
for the latex files:

open my $fh,"<:encoding(cp1250)","/my/latex/file.tex" or die $!;

print decode('latex',<$fh>);

See also the manpages for perlio and Encode

Joost.





------------------------------

Date: 30 Nov 2007 19:34:24 GMT
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: East european characters from LaTex to UTF8
Message-Id: <475065c0$0$18641$e4fe514c@dreader28.news.xs4all.nl>

On Fri, 30 Nov 2007 19:33:01 +0000, Joost Diepenmaat wrote:
> print decode('latex',<$fh>);

Oops. That should probably be

print decode('latex',join('',<$fh>))

or something similar - decode accepts only a single input string.

Joost.


------------------------------

Date: Fri, 30 Nov 2007 08:49:39 -0800 (PST)
From: Joe <zhilianghu@gmail.com>
Subject: Net::SSH::Perl security question
Message-Id: <15c7ffec-2f06-4afc-9cc5-b2e34c79673b@i29g2000prf.googlegroups.com>

We have a need to allow users to submit a job through a web server
(front end machine) to run on back end cluster machines. I made use of
Net::SSH::Perl in a CGI program to realize this.  One thing I notice
is that the CGI program requires a "/.ssh/known_hosts2" at the top
path of the file system on the front end machine where Apache is
running. I wonder does this potentially compromise any security on the
system?  Need expert advice ...

Thanks in advance!

Joe


------------------------------

Date: Fri, 30 Nov 2007 12:03:40 -0600
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Net::SSH::Perl security question
Message-Id: <4750507d$0$3578$815e3792@news.qwest.net>

Joe wrote:
> We have a need to allow users to submit a job through a web server
> (front end machine) to run on back end cluster machines. I made use of
> Net::SSH::Perl in a CGI program to realize this.  One thing I notice
> is that the CGI program requires a "/.ssh/known_hosts2" at the top
> path of the file system on the front end machine where Apache is
> running. I wonder does this potentially compromise any security on the
> system?  Need expert advice ...

Nothing to do with perl, however, the answer to your question is "No."

For more details, read the documentation for ssh:

man ssh

or discuss in a security/ssh related newsgroup.

Also, the CGI program doesn't require it, SSH is what uses/creates it.
Furthermore, the directory should be under the username running
the Apache process, not under root ( '/' ).


------------------------------

Date: Fri, 30 Nov 2007 19:28:31 +0100
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Net::SSH::Perl security question
Message-Id: <pan.2007.11.30.18.28.31@rtij.nl.invlalid>

On Fri, 30 Nov 2007 08:49:39 -0800, Joe wrote:

> We have a need to allow users to submit a job through a web server
> (front end machine) to run on back end cluster machines. I made use of
> Net::SSH::Perl in a CGI program to realize this.  One thing I notice is
> that the CGI program requires a "/.ssh/known_hosts2" at the top path of
> the file system on the front end machine where Apache is running. I
> wonder does this potentially compromise any security on the system? 
> Need expert advice ...

Just guessing but....

The CGI is probably looking for $HOME/.ssh/known_hosts2. Which means that 
either the HOME variable is not filled, or the user has / as his homedir.

M4


------------------------------

Date: Fri, 30 Nov 2007 18:39:35 +0100
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: OT raibow
Message-Id: <fipin5$vsd$1@ns.felk.cvut.cz>

My question is not perl specific but here are many clever people :-)
I want to generate html <select> object with all "safe" colors but in rainbow 
order (from white over yellow, red upt to black). I want to use hexadecimal 
values for RGB but only 0,33,66,99,cc and ff values.
Please know anybody some algorithm how to do it?

-- 
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail from 
another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>



------------------------------

Date: 30 Nov 2007 19:50:39 GMT
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: OT raibow
Message-Id: <4750698f$0$18641$e4fe514c@dreader28.news.xs4all.nl>

On Fri, 30 Nov 2007 18:39:35 +0100, Petr Vileta wrote:

> My question is not perl specific but here are many clever people :-) I
> want to generate html <select> object with all "safe" colors but in
> rainbow order (from white over yellow, red upt to black). I want to use
> hexadecimal values for RGB but only 0,33,66,99,cc and ff values. Please
> know anybody some algorithm how to do it?

A rainbow contains just the "unmixed" colors in the visible spectrum so 
it does not contain white or black and also misses a few other colors:
http://en.wikipedia.org/wiki/Visible_spectrum

If that's not a problem, see:
http://www.philiplaven.com/p19.html
http://www.midnightkite.com/color.html

Joost.


------------------------------

Date: Fri, 30 Nov 2007 19:54:14 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: OT raibow
Message-Id: <6c6625-2b1.ln1@osiris.mauzo.dyndns.org>


Quoth "Petr Vileta" <stoupa@practisoft.cz>:
> My question is not perl specific but here are many clever people :-)

 ...who are here to discuss Perl. Take your question elsewhere.

Ben



------------------------------

Date: Fri, 30 Nov 2007 09:46:24 -0800 (PST)
From: Bill H <bill@ts1000.us>
Subject: Perl and a Ramdisk
Message-Id: <3ca5b9e6-7f71-4321-9671-1d61d03fd88c@e67g2000hsc.googlegroups.com>

I am working on a chat program and am thinking of using a ramdisk to
hold the chat data. Is there anything special I should know about
accessing ramdisk from perl or is it just another disk to perl? On my
development machine I don't have a ramdisk, so I will be using the HD
for storing while debuging, but on the machine it will run on there is
one, and it would be nice if I could just have a variable holding the
destination and only have to change that instead of changing any
routines that did any file i/o.

Bill H


------------------------------

Date: Fri, 30 Nov 2007 10:12:11 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: Perl and a Ramdisk
Message-Id: <4d6daec8-70bf-439d-9ca6-e35e1cf28787@s8g2000prg.googlegroups.com>

On Nov 30, 12:46 pm, Bill H <b...@ts1000.us> wrote:
> I am working on a chat program and am thinking of using a ramdisk to
> hold the chat data. Is there anything special I should know about
> accessing ramdisk from perl or is it just another disk to perl? On my
> development machine I don't have a ramdisk, so I will be using the HD
> for storing while debuging, but on the machine it will run on there is
> one, and it would be nice if I could just have a variable holding the
> destination and only have to change that instead of changing any
> routines that did any file i/o.
>
> Bill H

"Premature optimization is the root of all evil."
 -- C. A. R. Hoare

Your plan is good right up to the part where you actually
switch over to using the ramdisk.  Every modern OS already
has excellent code to do secure and reliable caching of disk
data.  I would see if the disk access is actually a problem
before changing, which should be just the filename that you
open or a symbolic link.

If you do create a ramdisk, you will need to create a
filesystem in it, unless you plan on using the raw disk.
You will also have to preload it and worry about saving
it on shutdown if it will contain any permanent data.
--S


------------------------------

Date: Fri, 30 Nov 2007 11:45:16 -0800 (PST)
From: Bill H <bill@ts1000.us>
Subject: Re: Perl and a Ramdisk
Message-Id: <e3791e7a-4d6d-4d98-9a14-3c2acdbb23fd@g30g2000hsb.googlegroups.com>

On Nov 30, 1:12 pm, smallpond <smallp...@juno.com> wrote:
> On Nov 30, 12:46 pm, Bill H <b...@ts1000.us> wrote:
>
> > I am working on a chat program and am thinking of using a ramdisk to
> > hold the chat data. Is there anything special I should know about
> > accessing ramdisk from perl or is it just another disk to perl? On my
> > development machine I don't have a ramdisk, so I will be using the HD
> > for storing while debuging, but on the machine it will run on there is
> > one, and it would be nice if I could just have a variable holding the
> > destination and only have to change that instead of changing any
> > routines that did any file i/o.
>
> > Bill H
>
> "Premature optimization is the root of all evil."
>  -- C. A. R. Hoare
>
> Your plan is good right up to the part where you actually
> switch over to using the ramdisk.  Every modern OS already
> has excellent code to do secure and reliable caching of disk
> data.  I would see if the disk access is actually a problem
> before changing, which should be just the filename that you
> open or a symbolic link.
>
> If you do create a ramdisk, you will need to create a
> filesystem in it, unless you plan on using the raw disk.
> You will also have to preload it and worry about saving
> it on shutdown if it will contain any permanent data.
> --S

I am not concerned about loosing the data with shutdown, since it is
chat the data is transient, only need what someone types for a few
seconds to echo it to the other chatters. I am more concerned with
speed and less disk accesses. I figure it will be a whole lot faster
open a file, reading, writing, closing files in a ramdisk than in on a
HD.

Bill H


------------------------------

Date: Fri, 30 Nov 2007 18:48:34 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: retrieving news messages
Message-Id: <k0j0l3h5q9ta97np5oc7e5ddmf2lju379m@4ax.com>

On Thu, 29 Nov 2007 20:59:23 -0800, David Harmon <source@netcom.com>
wrote:

>>my $nntp = Net::NNTP->new(
>>   Host => 'newsgroups.comcast.net', 
>>   Debug => 1,
>>);
>
>Thanks for the explanation.  
>
>Nobody in the original thread figured it out.  The documentation

Somebody did figure it out.

>could be more clear, instead of requiring a look at the source to
>make sense of it.  Nothing to do with a hash after all, just pairs

I gave a peek into the source as well. The documentation is clear
enough. Somebody just mistakenly assumed that the options should have
been passed as a hashref, which is not the case: some modules do that,
but there's no general rule. I'm really blessing 6's signatures now!

>of argument names and values; I think mentioning hash just confused
>the original poster.

Who incidentally *appears* to be confused enough in his own right...


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Fri, 30 Nov 2007 12:19:03 +0100
From: Salvador Fandino <sfandino@yahoo.com>
Subject: Re: Sorted Hash
Message-Id: <fiorj9$gto$1@hefestos.uned.es>

palexvs@gmail.com wrote:
> I filled hash and then printed it (sorted by key):
> my %hs = (
> key10 => 5,
> key5  => b,
> aey9  => 7,
> )
> foreach my $k (sort keys %hs) {  print "$k $hs{$k}\n"; }
> 
> key - string ([0-9A-F]{72}), 50K records.
> How do it more effective?
> 

yu can use the radix sort implementation available from Sort::Key::Radix 
that is usually faster for this kind of data that the merge sort used 
internally by perl:


#!/usr/bin/perl

use strict;
use warnings;

use Benchmark qw(cmpthese);
use Sort::Key::Radix qw(ssort);

my @l = ('a'..'z','A'..'Z','1'..'9');

sub genkey { join '', map $l[rand @l], 0..71 }

my @keys = map genkey, 0..50_000;


sub psort { my @sorted = sort @keys }
sub rsort { my @sorted = ssort @keys }

cmpthese (-1, { psort => \&psort,
                 rsort => \&rsort } );


-----------

psort 4.39/s    --  -41%
rsort 7.41/s   69%    --


------------------------------

Date: Fri, 30 Nov 2007 12:36:22 +0000
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: Sorted Hash
Message-Id: <13l00u778o96ubd@corp.supernews.com>

xhoster@gmail.com wrote:
> "palexvs@gmail.com" <palexvs@gmail.com> wrote:
>> I filled hash and then printed it (sorted by key):
>> my %hs = (
>> key10 => 5,
>> key5  => b,
>> aey9  => 7,
>> )
>> foreach my $k (sort keys %hs) {  print "$k $hs{$k}\n"; }
>>
>> key - string ([0-9A-F]{72}), 50K records.
>> How do it more effective?
> 
> What is ineffective about the current way?
> 
> You could keep the structure sorted throughout its lifetime by using
> a tied hash or a non-hash structure, but the overhead of doing so
> is almost certainly going to be greater than a one-time sort.

Yes; maintaining a sorted sequence is "like" insertion sort.

   BugBear


------------------------------

Date: Fri, 30 Nov 2007 13:23:02 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Sorted Hash
Message-Id: <Xns99F85548A48B8asu1cornelledu@127.0.0.1>

Salvador Fandino <sfandino@yahoo.com> wrote in news:fiorj9$gto$1
@hefestos.uned.es:

> palexvs@gmail.com wrote:
>> I filled hash and then printed it (sorted by key):
>> my %hs = (
>> key10 => 5,
>> key5  => b,
>> aey9  => 7,
>> )
>> foreach my $k (sort keys %hs) {  print "$k $hs{$k}\n"; }
>> 
>> key - string ([0-9A-F]{72}), 50K records.
>> How do it more effective?
>> 
> 
> yu can use the radix sort implementation available from
> Sort::Key::Radix 
> that is usually faster for this kind of data that the merge sort used 
> internally by perl:

Does sorting speed matter when most of the time is spent printing?

Sinan


-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>



------------------------------

Date: Fri, 30 Nov 2007 14:26:07 +0100
From: Damian Lukowski <damian@tvk.rwth-aachen.de>
Subject: Re: Sorted Hash
Message-Id: <5rahbgF13oa7gU1@mid.dfncis.de>

A. Sinan Unur schrieb:

> Does sorting speed matter when most of the time is spent printing?

You never know whether he's not redirecting stdout to a file on a 
ramdisk. :)


------------------------------

Date: Fri, 30 Nov 2007 10:35:44 -0600
From: Ignoramus22774 <ignoramus22774@NOSPAM.22774.invalid>
Subject: Why is a perl script 'sleep 100' uses 100 MEGS of RAM
Message-Id: <YNadnU9zusx9ps3anZ2dnUVZ_tmhnZ2d@giganews.com>

I have a  Fedora 8 Linux box with 64 bit OS and stock perl.

Just invoking perl executable seems to take 100 MEGS of virtual memory!

That's a huge amount. Here's proof:

work$ perl -e 'sleep 10' & sleep 1; ps -eo pid,vsz,rsz,args|grep perl |grep 'sleep 10'
[3] 15023
15023  98892  1404 perl -e sleep 10
      ^^^^^^^ virtual memory use

My question is, WTF is going on, why does it need so much memory all of a sudden.

For your information, on my home 32 bit linux box running Fedora 6, it uses 3 megs of VM:

home$
perl -e 'sleep 10' & sleep 1; ps -eo pid,vsz,rsz,args|grep perl |grep 'sleep 10'
[1] 27037
27037   3744  1236 perl -e sleep 10

i


------------------------------

Date: Fri, 30 Nov 2007 09:25:55 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: Why is a perl script 'sleep 100' uses 100 MEGS of RAM
Message-Id: <5a661bd0-f55a-4852-b645-a39aeff73550@b15g2000hsa.googlegroups.com>

Ignoramus22774 wrote:
> I have a  Fedora 8 Linux box with 64 bit OS and stock perl.
>
> Just invoking perl executable seems to take 100 MEGS of virtual memory!
>
> That's a huge amount. Here's proof:
>
> work$ perl -e 'sleep 10' & sleep 1; ps -eo pid,vsz,rsz,args|grep perl |grep 'sleep 10'
> [3] 15023
> 15023  98892  1404 perl -e sleep 10
>       ^^^^^^^ virtual memory use
>
> My question is, WTF is going on, why does it need so much memory all of a sudden.
>
> For your information, on my home 32 bit linux box running Fedora 6, it uses 3 megs of VM:
>
> home$
> perl -e 'sleep 10' & sleep 1; ps -eo pid,vsz,rsz,args|grep perl |grep 'sleep 10'
> [1] 27037
> 27037   3744  1236 perl -e sleep 10
>
>

You are incorrect.  The output of ps is in 4K pages, so the VM size is
400MB.
Why do you care how much virtual memory is used?
Look at some of the other programs on a 64-bit system:
2808 218628 18144  /usr/libexec/gdmgreeter
         ^-- Yes, almost a GB to do the login screen

Neither VSZ nor RSZ mean much.  VSZ corresponds to no practical
limit on a 64-bit system, and RSZ includes all linked shared libraries
that
are currently resident.  The time needed to add a refcount to 1000
already
resident pages is tiny compared to the time needed to load a single
page of
code from disk, so linking to shared libraries is a very good thing.

If you want to know something more relevant about your process, run
iostat
while it runs and see how many blocks are read from disk in order to
start
your program.  Divide the total by 2 and you get the amount of memory
loaded in KB (roughly).  I see a few hundred blocks.
--S


------------------------------

Date: Fri, 30 Nov 2007 08:43:55 -0600
From: hymie_@_lactose.homelinux.net (hymie!)
Subject: Re: writing to a notepad in perl
Message-Id: <AdOdnXF2isw2vM3anZ2dnUVZ_jKdnZ2d@comcast.com>

In our last episode, the evil Dr. Lacto had captured our hero,
  "rajendra" <rajendra.prasad@in.bosch.com>, who said:

>But there a way I can write a text file in fonts i.e some content in BOLD
>letters and some in italised  etc using perl functions.

The whole concept of a text file is based on it being text (that is,
unformatted).

If you include formatting information, then it is no longer a text file.

--hymie!    http://lactose.homelinux.net/~hymie    hymie@lactose.homelinux.net
------------------------ Without caffeine for 395 days ------------------------


------------------------------

Date: Fri, 30 Nov 2007 17:20:17 +0000
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: Re: writing to a notepad in perl
Message-Id: <47504655$0$21085$da0feed9@news.zen.co.uk>

hymie! wrote:
> In our last episode, the evil Dr. Lacto had captured our hero,
>   "rajendra" <rajendra.prasad@in.bosch.com>, who said:
> 
>> But there a way I can write a text file in fonts i.e some content in BOLD
>> letters and some in italised  etc using perl functions.

First you have to choose a system for representing the formatting 
information. There are many.
     #!perl
     use strict; use warnings;
     print "plain *bold* _italic_ in some viewers \n";

I'd search CPAN for more useful approaches.

> 
> The whole concept of a text file is based on it being text (that is,
> unformatted).

I know what you mean, and it's pertinent since the OP mentions notepad, 
but I'd say "plain text" where you say "text". To me, Rich Text Format 
(RTF) is text too, though only just :-). Widely used MIME types like 
"text/plain", "text/rtf" and "text/html" tend to reinforce this idea.

> 
> If you include formatting information, then it is no longer a text file.

IKWYM but http://c2.com/cgi/wiki?TextFilter

> 
> --hymie!    http://lactose.homelinux.net/~hymie    hymie@lactose.homelinux.net
> ------------------------ Without caffeine for 395 days ------------------------

Just a thought: if you change your "signature" separator to hyphen 
hyphen space newline then most newsreaders will recognise it as a 
"signature", display it differently and automatically omit it from replies.

Although minus minus space newline is (arguably) formatting information, 
your posting is still recognisably "text" :-)


------------------------------

Date: Fri, 30 Nov 2007 17:22:36 +0000
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: Re: writing to a notepad in perl
Message-Id: <475046dd$0$21085$da0feed9@news.zen.co.uk>

RedGrittyBrick wrote:
>     print "plain *bold* _italic_ in some viewers \n";

Dang!
     print "plain _underlined_ *bold* /italic/ in some viewers \n";

:-(


------------------------------

Date: Fri, 30 Nov 2007 18:53:12 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: writing to a notepad in perl
Message-Id: <pdj0l3p8e2acpp13pds1rimmfa21d17gul@4ax.com>

On Fri, 30 Nov 2007 17:20:17 +0000, RedGrittyBrick
<RedGrittyBrick@SpamWeary.foo> wrote:

>>> But there a way I can write a text file in fonts i.e some content in BOLD
>>> letters and some in italised  etc using perl functions.
>
>First you have to choose a system for representing the formatting 
>information. There are many.
>     #!perl
>     use strict; use warnings;
>     print "plain *bold* _italic_ in some viewers \n";
>
>I'd search CPAN for more useful approaches.

You somehow (loosely) remind me of one of the funniest wtf I've read
as of recently:

http://worsethanfailure.com/Articles/Notepad-Translation-Error.aspx


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 1083
***************************************


home help back first fref pref prev next nref lref last post