Re: how to write driver

2006-05-31 Thread $Bill Luebkert
Petr Vileta wrote: > Know somebody how to write driver in Perl? For Windows of course :-) > I want to monitor data from Windows to printer on LPT1 because after install > of some program the printing from DOS box failure. Know somebody how to hack > my perl script (or compiled exe file) into Win

Re: Analyzing perl array to extract maximum occuring element

2006-05-31 Thread Williamawalters
hi sekar --     In a message dated 5/31/2006 9:08:32 P.M. Eastern Standard Time, [EMAIL PROTECTED] writes:   > How to identify a  maximum occuring element in a Perl Array>  > e.g  @array values are  CMSIF CMSIF CMSFV>  > Since CMSIF has two occurences , I need to select CMSIF >  > Any sugg

Re: Analyzing perl array to extract maximum occuring element

2006-05-31 Thread $Bill Luebkert
sekhar kavuru wrote: > How to identify a maximum occuring element in a Perl Array > > e.g @array values are CMSIF CMSIF CMSFV > > Since CMSIF has two occurences , I need to select CMSIF > > Any suggestions Lots of ways to do it. I'd probably just map it into a hash increasing the count b

Re: Analyzing perl array to extract maximum occuring element

2006-05-31 Thread Petr Vileta
- Original Message - From: "sekhar kavuru" <[EMAIL PROTECTED]> To: Sent: Thursday, June 01, 2006 2:19 AM Subject: Analyzing perl array to extract maximum occuring element How to identify a maximum occuring element in a Perl Array e.g @array values are CMSIF CMSIF CMSFV Since CM

how to write driver

2006-05-31 Thread Petr Vileta
Know somebody how to write driver in Perl? For Windows of course :-) I want to monitor data from Windows to printer on LPT1 because after install of some program the printing from DOS box failure. Know somebody how to hack my perl script (or compiled exe file) into Windows like printer driver?

Analyzing perl array to extract maximum occuring element

2006-05-31 Thread sekhar kavuru
How to identify a  maximum occuring element in a Perl Array   e.g  @array values are  CMSIF CMSIF CMSFV   Since CMSIF has two occurences , I need to select CMSIF   Any suggestions   Thanks   Sekhar How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.___

Re: Installing CPAN

2006-05-31 Thread Petr Vileta
Wilkinson, Stephen E wrote: When trying to install CPAN bundle, I get this error: 'C:\Program' is not recognized as an internal or external command, operable program or batch file.' Please see below for partial output from the end of the install, and my config. Looks like it is trying to run th

Re: Installing CPAN

2006-05-31 Thread Chaddaï Fouché
Could you please avoid quoting a whole bunch of mail which are perfectly OT when posting a new question ? The problem is on this line : make C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BI N\nmake.EXE As there are spaces in this path, you should modify this option

Re: To find if a function exists

2006-05-31 Thread Alan M. Carroll
I had the same issue as well. I wrote a class (attached) to encapsulate references to routines via the name so that I could lazy-load them (this is useful for template systems to avoid loading every possible tag implementation every time). The logic tries to load the package for the symbol if n

RE: To find if a function exists

2006-05-31 Thread Mathieu Longtin
The easiest way is to call prototype. It dies if the function doesn't exist. sub function_exists { eval { prototype $_[0] }; return ! $@ } if ( function_exists("whatever") ) { ... } > [EMAIL PROTECTED] wrote: > > : I am writing a perl code which automatically forms a > : function name

Installing CPAN

2006-05-31 Thread Wilkinson, Stephen E
When trying to install CPAN bundle, I get this error: 'C:\Program' is not recognized as an internal or external command, operable program or batch file.'   Please see below for partial output from the end of the install, and my config.   Looks like it is trying to run the nmake test.  Looks

Re: To find if a function exists

2006-05-31 Thread David Nicol
# perl -wle 'sub aaa{print 1}; exists &main::aaa and print "yes"' yes# perl -wle 'sub aaa{print 1}; exists &main::aab and print "yes"' # -- David L Nicol"For every thousand hacking away at the leaves of evil, there is onestriking at the root." -- Thoreau. ___

Re: To find if a function exists

2006-05-31 Thread Eric Amick
> I am writing a perl code which automatically forms a function name using > certain > criteria and then calls the same > > I have a run time error reporting function not existing, if the function as > such > did not exist > But I would like the execution to continue searching for other functi

Re: Removing numeric character references

2006-05-31 Thread Craig Cardimon
Brian Raven wrote: Craig Cardimon <> wrote: I've managed to strip all HTML from a document except for some strange hangers-on:   ’ “ ” — ¨ ® I'd like to kill all of these kinds of things, substituting whitespace or apostrophes or whatever they are supposed to be, without my having to specify e

RE: Removing numeric character references

2006-05-31 Thread Brian Raven
Craig Cardimon <> wrote: > I've managed to strip all HTML from a document except for some strange > hangers-on: > >   > ’ > “ > ” > — > ¨ > ® > > I'd like to kill all of these kinds of things, substituting > whitespace or apostrophes or whatever they are supposed to be, > without my having to spe

RE: To find if a function exists

2006-05-31 Thread Charles K. Clarkson
[EMAIL PROTECTED] wrote: : I am writing a perl code which automatically forms a : function name using certain criteria and then calls the : same It would probably be safer to use a hash table for that. : I tired using the following code : doesnt seem to work : : my $func = \&TEST3; : if (!

RE: copying chunks

2006-05-31 Thread Brian Raven
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Rychlik Sent: 31 May 2006 13:43 To: activeperl@listserv.ActiveState.com Subject: copying chunks > Good Wednesday Morning, > > > > Is their a way in perl to break a file a part into separate chunks, write the chunk to the har

RE: copying chunks

2006-05-31 Thread Daniel Rychlik
That’s exactly what I need.  I found it in my book as well…   Thanks!   -Dan   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 31, 2006 8:23 AM To: Daniel Rychlik Cc: activeperl@listserv.ActiveState.com; [EMAIL PROTECTED] Subject: Re: copying chunks

Re: copying chunks

2006-05-31 Thread Deane . Rothenmaier
My apologies--it's too early in the morning to think (or *read*) straight. The poor guy's asking how to write and I tell him how to read.  duh.  B-( Deane "Daniel Rychlik" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 05/31/2006 07:42 AM                 To:                 cc:          

Re: copying chunks

2006-05-31 Thread Deane . Rothenmaier
From the Camel book: read FILEHANDLE, SCALAR, LENGTH, OFFSET read FILEHANDLE, SCALAR, LENGTH ...attempts to read LENGTH bytes of data into variable SCALAR from the specified FILEHANDLE. Page 202 of 2nd Edition. HTH, Deane "Daniel Rychlik" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED]

Removing numeric character references

2006-05-31 Thread Craig Cardimon
I've managed to strip all HTML from a document except for some strange hangers-on:   ’ “ ” — ¨ ® I'd like to kill all of these kinds of things, substituting whitespace or apostrophes or whatever they are supposed to be, without my having to specify each thing. Any suggestions? I looked on CPA

copying chunks

2006-05-31 Thread Daniel Rychlik
Good Wednesday Morning,   Is their a way in perl to break a file a part into separate chunks, write the chunk to the hard disk, and then copy up the next chunk of data; keep repeating all the chunks until the file is complete?   Dan ___

Re: To find if a function exists

2006-05-31 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > Hi > I am writing a perl code which automatically forms a function name using > certain criteria and then calls the same > > I have a run time error reporting function not existing, if the function > as such did not exist > But I would like the execution to continue se

RE: How to modify $ENV{PATH} portably?

2006-05-31 Thread Brian Raven
Petr Vileta <> wrote: > - Original Message - > From: "Arijit Das" <[EMAIL PROTECTED]> > To: "activeperl@listserv.activestate.com" > ; > "perl-unix-users@listserv.activestate.com" > > Sent: Tuesday, May 30, 2006 8:51 AM > Subject: How to modify $ENV{PATH} portably? > > >> Hi, >> >> The f

To find if a function exists

2006-05-31 Thread sasisekar.krish
Hi I am writing a perl code which automatically forms a function name using certain criteria and then calls the same   I have a run time error reporting function not existing, if the function as such did not exist But I would like the execution to continue searching for other functions   So, is