Re: Improving the Quality of Our Beginners was Re: Write permissions and other rights

2002-04-25 Thread Beau
to be naive and ignorant and slow. If this isn't the place for such perhaps someone can point to a similar resource that *is* for the absolute beginner? - -- Beau -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org

mod_perl

2002-04-25 Thread Beau
" I am at a total loss as to how to procede. And I'm hoping this is not too terribly ot. - -- Beau -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8yL4PbMtNI7KvfxQRAhNcAJ9gJduB7p7xTBtrE9mOmZA0ZjdGBwCguB/0 zjeQIcW

Re: mod_perl

2002-04-26 Thread Beau
ver on my own, even worse than the one missing semi-colon in the thousand-line script (which would be caught by -w anyway.) Thanks also to Wayne; my install came with my rh7.1; it's an rpm. But I'm about to rpm -e the old one out; guess I'll try CPAN for the update. Cheers! -

more mod_perl

2002-04-26 Thread Beau
I did look in the Makefile.pl and indeed found both MP_APXS and MP_AP_PREFIX but haven't a clue how to specify them nor what to specify them to. Many thanks! - -- beau -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see

Re: Selftuition

2002-04-29 Thread Beau
s. If you don't have the unix head set, if you're not a native speaker of that special dialect then man and perldoc and all manner of things are just plain intimidating. I hear "Learning Perl" is the best bet for a structured set of exercises building in a graduated manner fr

mod_perl with existing apache (with apologies for parroting...)

2002-04-30 Thread Beau
or point me to an appropriate resource? So far I've had no answer from the folks at axkit.com, who, in turn, host or sponsor take23. Many thanks! - -- beau -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8zxpsbMtNI7Kvfx

using strict and -w

2002-04-30 Thread Beau
nDiference: $diff\nProduct: $product\n"; print "Quotient: $quotient\nRemainder: $remainder\nExponent: $exponent\n"; - -- beau -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8zzZnbMtNI7KvfxQRAlN+AKC7J6D7tuDtwcRquwH/k15hy

tutorials to avoid?

2002-04-30 Thread Beau
and such. Can anyone recommend where to start or what to avoid of this batch, given that my ultimate goal is perl for web sites and site maintenance? (The cgi oriented bits are where I'll start without a good recommendation...) Mille gratsi! - -- beau -BEGIN PGP SIGNATURE- Versio

Re: meandering towards Topic

2002-05-10 Thread Beau
; at least if you're using the builtins... - -- beau "Thanks for Everything"--Issei -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE83BaIbMtNI7KvfxQRAgleAJ4x7wXrcld+MQSrDF0PzdMiUQRRoACcCrkJ dVpK1mx5MhK7EszuMIPbt0E= =

Re: Books

2002-05-14 Thread Beau
would it be better to work from the old book in hand or to give it the ol' heave ho and live (and die) by the perldocs? Are there any simple caveats that would help one safely squeeze value from the 2nd ed? - -- beau "Thanks for Everything"--Issei -BEGIN PGP SIGNATURE-

Re: Books

2002-05-15 Thread Beau
of Programming Perl at this late date? - -- beau "Thanks for Everything"--Issei -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE84oLRbMtNI7KvfxQRAq/eAJ4iFT7ZOuGeB+yMVAhOrihvMQ1vYwCeN9Pr oPC/I70XZv0usr2vMQCXp2c= =Sfp6

Re: Production Mode: Warnings?!

2003-03-10 Thread beau
to log anything output to STDERR: perl my_script 2>> /somewhere/my_script-error.log and look at the error log often/daily (or have a deamon look at it automatically, and email you, etc.). Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to Access Serial Port in Perl

2003-03-11 Thread beau
want to go to: httpd:://search.cpan.org and search on 'SerialPort' - lots of stuff; in the future, you may want to do that first, before posting to this list - then you can ask questions like: has anyone used xxx::xxx? is it OK on my system ? etc. Aloha => Beau; -- To unsubscr

Re: Compiling Perl?

2003-03-15 Thread beau
Apache issues, in addition to fast cgi execution, I would recommend mod_perl. Setting up fast cgi (via the mod_perl Apache::Registry) is easy; the 'good' parts of mod_perl do require a lot of study and practice, but IMHO are well worth it. See perl.apache.org. Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Multi-OS script

2003-03-20 Thread beau
o a simple, elegant, perlish solution? Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Multi-OS script

2003-03-21 Thread beau
32 systems. > > You can use require/import in a BEGIN block, and in > 5.8.0 there is also --> > > use if $^O eq "MSWin32" => Win32::API; > use if $^O eq "MSWin32" => Win32::DriveInfo; > Yep, I'm using require/import, but that 5.8 solution is really slick - thanks! Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: extracting numbers from a string

2003-03-22 Thread beau
not a digit 0-9, nothing will be captured and $nbr will be undefined. Otherwise, $nbr contains the first digit of the line. If you would rather capture the entire number that starts the line, use: my ($nbr) = /^(\d+)/; \d+ says one or more (+) digits. Study your regexs! :) Aloha => Beau;

Getting keyboard scancode, etc.

2003-03-23 Thread beau
information via Win32::Console, so I know that these data are still alive and well in the hardware. How do I get them in Linux running under X? I've looked and looked in CPAN and nothing rings a bell... Aloha => Beau; PS: Idea for CPAN module name: Rings::ABell; -- To unsubscribe

Re: Getting keyboard scancode, etc.

2003-03-23 Thread beau
ascii code, etc. from a keystroke. > > I need this information for a cross-os application > > I am trying to write. > > [...] > > How do I get them in Linux running under X? I've > > looked and looked in CPAN and nothing rings > > a bell... > > >

Re: passing variables into mysql

2003-03-31 Thread beau
Hi - On 1 Apr 2003 at 1:20, Jasmine wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > Hi > > Is there any way to pass variables into MySQL statements for execution? I m > using the DBI package. Thanks! > > Heres my snippet and it doesnt work. > dbconnect(); >

'Soft' link 'real; filename

2003-04-06 Thread beau
Hi - A little OT, but, with Perl runing under Linux, is there any way to get the 'target' file name of a 'soft' link? Or even determine a filename is a 'soft' link? (By 'soft' I mean a link created so: ln -s target link). Aloha => Beau; -- To

Re: 'Soft' link 'real; filename

2003-04-06 Thread beau
my $actual_file = readlink $soft_link; > ... Thanks John - I don't know how I missed that! Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Getting Image data

2003-04-06 Thread beau
rn = $image->Read ($in); if ($warn) { $m->comp ('/shared/_error' => "error getting size for image $in: $warn"); return (0, 0); } my ($w, $h) = ($image->Get ('width'), $image->Get ('

Is it piped?

2007-06-09 Thread Beau Cox
Hi - From within a perl script, how can I deternine if STDxxx is from/to a pipe? Aloha => Beau;

TTF problem with GD

2001-10-25 Thread Beau E. Cox
erl. 3. Latest GD PPMed from ActiveState. 4. The rest of GD works fine. 5. Font used (verdana) copied from /WINNT/Fonts to CWD. 6. I have tried _all_ ttf fonts - same results. 7. stringTTF returns a reasonable bounding rectangle, the pod says this won't happen if GD does not have TTF su

RE: Chainging values in a hash..

2001-10-25 Thread Beau E. Cox
1'}= "crud9"; $hash{"Crud2'}{'test1'}= "crud9"; $hash{"Crud3'}{'test1'}= "crud9"; Or have some sort of loop. Aloha - Beau. PS: I have been converting my config files to XML (XML::Parser, etc.) Works good! -Original Messa

RE: Directories, Arrays

2001-10-26 Thread Beau E. Cox
er documentation on the -X (file test) operator. >>3. How do I do a pattern search that looks for capital >>words only? Try this: my $test = "Test: HELLO my name is BEAU Cox"; $_ = $test; my @cap_words = /\s*([A-Z0-9\.@_]+?)\s+/g; print

RE: create hash and print all elements?

2001-10-26 Thread Beau E. Cox
Hi - This looks like a hash to me: my %color_hash = { "sky" => "blue", "grass" => "green", "apple" => "red", }; for my $key (keys %color_hash) {

RE: Stupid question...

2001-10-26 Thread Beau E. Cox
Hey - You also might try "perl2exe" (search for it on www.google.com). $40 shareware. Aloha - Beau. -Original Message- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Friday, October 26, 2001 2:29 PM To: [EMAIL PROTECTED] Subject: Stupid question... Hey List, This

Mac::Glue with Adobe Illustrator

2009-06-09 Thread Beau E. Cox
an existing .ai file: #!/usr/bin/perl use strict; use warnings FATAL => "all"; use Mac::Glue qw( :all ); my $ill = Mac::Glue::->new( "Adobe Illustrator" ) or die "cannot get Illustrator: $^E\n"; my $file = "video-test.ai"; $ill->open( $fil

Re: Multiline comment in Perl

2008-05-16 Thread Beau E. Cox
On Thu, May 15, 2008 at 11:24 PM, sivasakthi <[EMAIL PROTECTED]> wrote: > Hi all, > > > How to comment Multiple lines in Perl? > > > > Thanks, > Siva > =comment like this example =cut Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: I'm sure this is a common question, but I can't find the solution.

2009-03-15 Thread Beau E. Cox
is easier to write, you may also escape the double quotes: \"\n\" works. Beau; -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: jump out of conditional loop

2004-03-04 Thread Beau E. Cox
== break ... next; # == continue ... } Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Disable Screensaver with Keyboard input

2004-03-05 Thread Beau E. Cox
x27;ve moved on to Linux - a real operating systen ;) ), but I think you can do something with W32::Console. Have a look at the docs on CPAN (or is it a domain policy that you cannot install CPAN modules?). Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Re: Character Count

2004-03-23 Thread Beau E. Cox
ns like: ** use strict; # get in this habit use warnings; while () { chomp; my @fields = split(/\t/); my $count = 0; for my $field( @fields ) { $count += length $field; } print "$count\n"; } **

Re: Using $_ in a function if no argument is passed

2004-04-02 Thread Beau E. Cox
he incoming argument the - # 0th element of @_. $_[0] = uc $_[0]; } sub to_lower { # traditional approach my $string = shift; lc $string; return $string; } When run, it returns: before to_upper: hello after to_upper: HELLO after to_lower: HELLO Aloha => Beau;

Re: Using $_ in a function if no argument is passed

2004-04-02 Thread Beau E. Cox
On Friday 02 April 2004 07:04 am, Beau E. Cox wrote: > On Friday 02 April 2004 06:37 am, JupiterHost.Net wrote: > > Hello List, > > > > It just occurred to me that many Perl functions use $_ if not other > > value is supplied. chomp for instance..., which is very handy.

Re: Date problem

2004-04-26 Thread Beau E. Cox
on Apr 26 08:04:23 GMT 2004 > bash-2.03$ > > It shows the month as March (3) instead of April. What > could I be doing wrong? > > Thanks in Advance Check the docs: the months go from 0..11 in localtime. Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Variable "$some_var" will not stay shared

2004-05-06 Thread Beau E. Cox
shared at ev2.pl line 17. mary and jane Can you nest subroutines? What do the warnings mean? Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Variable "$some_var" will not stay shared

2004-05-06 Thread Beau E. Cox
On Thursday 06 May 2004 02:45 am, you wrote: > Beau, > This is coz you have defined $arg1 and $arg2 to be local, hence when u > defined a new subroutine, a new sope is defined, and is beyond the scope of > $arg1 and $arg2. Hence the error. > > HTH > > srikanth srikant

Re: Variable "$some_var" will not stay shared

2004-05-06 Thread Beau E. Cox
will not stay shared at (eval 1) line 13. Variable "$arg2" will not stay shared at (eval 1) line 13. jack and jill already compiled Embed::ev1_2epl jack and jill Sorry all, I know this is a bit much... Aloha => Beau; 'persistent' perl package (Embed::Persistent) and test code fo

Re: Variable "$some_var" will not stay shared

2004-05-06 Thread Beau E. Cox
On Thursday 06 May 2004 11:40 am, Perrin Harkins wrote: > On Thu, 2004-05-06 at 17:19, Beau E. Cox wrote: > > But maybe I could explain the overall picture. I am trying to embed > > 'any' script (whthout modification) in perl; I use a perl package > > (which is r

Re: using environment proxy variables for LWP::Simple

2004-05-24 Thread Beau E. Cox
hen store the results keyed by # search terms, otherwise keyed by $KEY I have tested it on Linux and it works fine (both when http_proxy is in the environment and when not). Darren - would you consider applying something like the above patch to specify http proxies in a future release of Tie::Google ? Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: regular expression

2004-05-28 Thread Beau E. Cox
"; # 'slurp" file to scalar (avoids having to 'for' thru array $_ = do { local $/; ; }; # remove non alphebetics s/[^A-Za-z0-9\s]//sg; # change non-nl whitespace to one space s/[\t ]+/ /sg; # seek to start, rewrite, and close seek FP, 0, 0; print FP $_; close FP;

Re: regular expression

2004-05-28 Thread Beau E. Cox
On Friday 28 May 2004 05:47 pm, John W. Krahn wrote: > "Beau E. Cox" wrote: > > On Friday 28 May 2004 03:31 pm, Mandar Rahurkar wrote: > > > for(@cont) { > > > tr/A-Z/a-z/; > > > > You forgot the 'g': > >tr/A-Z/a-z/g; > >

Elegant quoted word parsing

2004-06-10 Thread Beau E. Cox
-&-randy 'lewis'-&-apple-&-corn dog-&-0-&-1-&-2- Now this is fine, and I can use it as is, but, I seems a bit pedestrian and heavy-handed. I tried, and failed, to write one using a super-all- in-one regex in a progressive matching /g while loop. Does anyone want to

Re: Regx for validating E-Mail addresses

2004-06-24 Thread Beau E. Cox
\=\+\$\|\,\-\.\!\~\*\'\(\)[EMAIL PROTECTED]; which is a closer approximation to the RFC than your tests. It is prob not restrictive enough, but I use it only to format my web pages with an email address href. You should check CPAN also. Aloha => Beau; -- To unsubscribe, e-mail: [EM

Re: different argv behavior in different machines

2004-06-24 Thread Beau E. Cox
argv works at all. Pulling an element from an array should use '$': $ARGV[0] -not- @ARGV[0] Also, get in the habit of starting all your scripts with: use strict; use warnings; my $test= $ARGV[0]; # proper format die "nothing in array" unless $test; # unless

Re: calculating http download speed

2004-06-24 Thread Beau E. Cox
y time taken. getting > the size is easier than calculating the time taken for the download. > > Any pointers would help. > > thanks, > Radhika Hi - Look at the various timer methods in Time::HiRes on CPAN. I am sure one of those will work for you. Aloha => Beau; -- To unsubscri

Re: How to call a perl script....

2004-06-24 Thread Beau E. Cox
l slave.pl"; ... or backtics if you want to capture output from the slave my $slave_output = `perl slave.pl`; In each case, check the return codes (see the documentation). Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] &

Re: is perl a script language?

2004-06-25 Thread Beau E. Cox
xxx.pl". Maybe if you tell us more about what you are trying to do, we can help you select a module or modules you may need and step you through the process. Don't give up! You will be rewarded. Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Re: is perl a script language?

2004-06-25 Thread Beau E. Cox
On Thursday 24 June 2004 11:09 pm, lfm wrote: > thank u > > Beau > > but i am stilled puzzled . > > since it is a script language ,why not we write the *.pm directly and put > to the lib directory(or other place) . > > I opened the *.pm and found there are on

Re: How to call a perl script....

2004-06-25 Thread Beau E. Cox
On Friday 25 June 2004 04:30 am, u235sentinel wrote: > Beau E. Cox wrote: > >On Thursday 24 June 2004 08:32 pm, Charlene Gentle wrote: > > > > > >You can use the 'system' command: > > > >##--master-- > >... > >my $rc = system "perl

Re: Elegant quoted word parsing

2004-06-25 Thread Beau E. Cox
On Sunday 13 June 2004 02:39 am, Jeff 'japhy' Pinyan wrote: > On Jun 10, Beau E. Cox said: > >sub parse_words > >{ > >my $line = shift; > >my @words = (); > > > >$_ = $line; [snipped] Thank you, japhy, and others who took the time to he

Re: is perl a script language?

2004-06-29 Thread Beau E. Cox
On Sunday 27 June 2004 03:06 pm, lfm wrote: > hello ,beau > > > I have installed bugzilla on the windows, but failed on the linux! > > where? > > the perl module installation! > > I download the perl module from cpan, tar them and > perl Makefile.PL >

Re: Dynamically updating perl variables

2006-07-25 Thread Beau E. Cox
# regex over multiple lines for keyword and pick up single digit # defaults to 0 if not found $delay = $contents =~ /delay\s*=\s*(\d)/s ? $1 : 0; $continue = $contents =~ /continue\s*=\s*(\d)/s ? $1 : 0; close(FILE); return ($delay, $continue); } Untested! Beware of typos. -- Aloha =>

iso-8859-1 to unicode problem

2007-04-24 Thread Beau E. Cox
Hi - I am new to international character encoding and how the various encodings are handled in perl. After a day of reading, I'm asking for help. I am downloading data from an international (French) web site. The HTTP headers show that the pages I am downloading are encoded in iso-8859-1. Most ch

Re: iso-8859-1 to unicode problem

2007-04-24 Thread Beau E. Cox
On Tuesday 24 April 2007 02:07, Mumia W. wrote: > On 04/24/2007 03:06 AM, Jeff Pang wrote: > > 2007/4/24, Beau E. Cox <[EMAIL PROTECTED]>: > >> How do I get a proper conversion from iso-8859-1 to perl's internal > >> utf8? [snipped] > I don't think it&

Setting $! in xs

2011-08-06 Thread Beau E. Cox
Hi - I am a bit confused about how to set $! from within an xs module. I have searched perlxstut, perlxs, and perlguts without really understanding what is involved. Can some one either point me to a module that sets $! or give me a short description on how it is done? Thanks!

Tk bind

2002-05-10 Thread Beau E. Cox
... and so on. The window works, but DoMainActivate is never called (confirmed with the debugger). Using ActivePerl 5.6.1 w/Tk 800.023 on Win32 (W2K). Aloha - Beau. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Creating a byte buffer

2002-05-11 Thread Beau E. Cox
to pass to my C++ routine(s). I know I have to pass the scalar length also beacuse I cannot depend upon a NULL terminator. I've got the perl-to-C++ interface working fine... :-( Aloha - Beau. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: File system

2002-05-14 Thread Beau E. Cox
Singh - I can't find a pure-perl way to get a win32 drive list. However, since I'm new to perl and have just started to write modules, I have attached a module (Win32-Getdrives-0.01.tar.zip) that I just wrote that encapsulates the win32 _getdrives function. Usage: use Win32::Getdrives;

RE: about posting tarballs - Re: File system

2002-05-14 Thread Beau E. Cox
Sorry All - Just a Win32::geek and a perl newbie that didn't know any better. I will post this module on my web site... Thanks for letting me know, drieux. Aloha - Beau. -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 3:24

Win32::Getdrives

2002-05-14 Thread Beau E. Cox
Beware - it's brand-new and I'm a newbie! I have tested it on Windows 2000 and Windows XP and my machines are still alive, but, again, beware. Aloha - Beau. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Win32::Getdrives

2002-05-15 Thread Beau E. Cox
Felix - Good comment. I missed the GetLogicalDrives... But I did have fun writing my first module! Aloha - Beau. -Original Message- From: Felix Geerinckx [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 11:22 PM To: [EMAIL PROTECTED] Subject: Re: Win32::Getdrives on Wed

RE: Win32::Getdrives

2002-05-15 Thread Beau E. Cox
x27;ers) can install and use modules. ActiveState PPM? ??? Aloha - Beau. -Original Message- From: Felix Geerinckx [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 11:38 PM To: [EMAIL PROTECTED] Subject: RE: Win32::Getdrives on Wed, 15 May 2002 09:26:52 GMT, [EMAIL PROTECTED]

RE: Getting "Can't locate Win32/Service.pm"

2002-05-17 Thread Beau E. Cox
n"; } It worked fine. According to the documentation, Win32::Service is Contained in libwin32-0.18. I am using ActivePerl (5.6.1), which comes bundled with libwin32, on a W2K machine. What is your configuration? If you are ActivePerl, you may want to PPM verify and/or ins

RE: Who debug me?

2002-05-17 Thread Beau E. Cox
Hi - Mayb... if ($usr == $usr1) {print "$usr $pass $email\n";} '==' is a NUMERIC compare, 'eq' is the corresponding alphanumeric compare. So: if ($usr eq $usr1) {print "$usr $pass $email\n";} or (to ignore case): if (lc $usr eq lc $usr1) {print "$usr $pass $email\n";} -Origin

RE: newbie question

2002-05-18 Thread Beau E. Cox
RegEx and get the results into an array... Aloha - Beau. -Original Message- From: Stuart Clark [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 18, 2002 1:48 AM To: Perl List Subject: newbie question Hi again, Thanks john for helping me with this solution to get the 16764 out of the $dat

RE: help!

2002-05-18 Thread Beau E. Cox
ting keys that don't have +1 or -1 neighbors, 3) numerically sort hash and populate result array. Oh, well... Aloha - Beau. -Original Message- From: Haitham N Traboulsi [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 4:09 PM To: [EMAIL PROTECTED] Subject: help! Hi, I am work

RE: printing html

2002-05-18 Thread Beau E. Cox
Hi - Unless I'm missing something, just print ...php stuff; Anything printed to STDOUT in a CGI module populates the web page. If you are using a CPAN module to generate HTML, just be sure to be "outside" his function calls. Aloha - Beau. -Original Message- From: Mat

RE: help!

2002-05-18 Thread Beau E. Cox
If this is homework, please send me 50% credit... -Original Message- From: Haitham N Traboulsi [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 4:09 PM To: [EMAIL PROTECTED] Subject: help! Hi, I am working on a chunk of PERL software that can find out the groups of consecutive numb

Effective Perl Programming

2002-05-18 Thread Beau E. Cox
g that the trailing semicolon in a block is optional, to: But in all seriousness, EPP is very helpful. Aloha - Beau. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: the homework assignment problem

2002-05-18 Thread Beau E. Cox
No, really - I showed you mine, now you show me yours! Aloha - Beau. -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 18, 2002 4:47 AM To: [EMAIL PROTECTED] Subject: the homework assignment problem On Saturday, May 18, 2002, at 06:22 , Beau E. Cox wrote

RE: help!

2002-05-18 Thread Beau E. Cox
Ok, but, but... I ignored uniqueness because non-unique numbers are NOT consecutive. My solution works on non-sorted input arrays. Aloha - Beau. -Original Message- From: Harry Jackson [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 18, 2002 5:01 AM To: [EMAIL PROTECTED] Subject: RE

RE: Effective Perl Programming

2002-05-19 Thread Beau E. Cox
Gee whiz - All I wanted were comments on the book... Has anyone out there read it? Aloha - Beau. -Original Message- From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 19, 2002 10:46 AM To: [EMAIL PROTECTED] Subject: RE: Effective Perl Programming --- Timothy Johnson

RE: sorting a hash alphabetically

2002-05-19 Thread Beau E. Cox
Hi - you suggested: > foreach $lastname (sort { $a cmp $b } keys %names) { > print "$lastname, $names{$lastname}\n"; > } That works well. I'm lazy, so I usually do something like: print "$_, $names{$_}\n" for (sort keys %names); 1) for == foreach so save 4 keystrokes. 2) I use the for ..

RE: help!

2002-05-20 Thread Beau E. Cox
t {$a <=> $b} keys %conseq); print "$_\n" for (@conseq); which produced the _correct_ result: 1 2 3 12 13 14 16 17 18 19 20 21 22 Aloha - test before you post - Beau. -Original Message- From: Jackson, Harry [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 19, 2002 10:49 PM

RE: help!

2002-05-20 Thread Beau E. Cox
Yeah, I think we've beat this one to death :-) Aloha => Beau. -Original Message- From: Jackson, Harry [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 7:06 AM To: '[EMAIL PROTECTED]' Subject: RE: help! What happened to these numbers was my point. Your method re

RE: Reverse sort?

2002-05-21 Thread Beau E. Cox
Hi - Try ... use strict; use warnings; my %hash = (a => 1, b => 2, c => 3,); # use the reverse keyword print "$_\n" for (reverse sort keys %hash); # reverse $a and $b print "$_\n" for (sort { $b cmp $a } keys %hash); Aloha => Beau. -Origina

RE: Strange total from adding 2 numbers

2002-05-23 Thread Beau E. Cox
Hi - In your browser, go to <http://www.perldoc.com/perl5.6.1/pod/perlfaq4.html>. In general, you can get most perl core and module documentation at <http://www.perldoc.com> and/or <http://www.cpan.org>. Aloha => Beau. -Original Message- From: LoBue

RE: subsrting question

2002-05-23 Thread Beau E. Cox
it!\n" if $line =~ m/sleeping for 10/i; # or find all occurences: my @results = $line =~ m/(sleeping for 10)/gi; print 'Found ', scalar (@results), " occurences\n"; output => xxxSleeping for 10xxx Sleeping for 10 Got it! Got it! Found 1 occurences Aloha => Beau.

RE: Telnet Program

2002-05-23 Thread Beau E. Cox
t;cmd("/usr/bin/who"); print @lines; Aloha => Beau. -Original Message- From: Jason Frisvold [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 9:38 AM To: [EMAIL PROTECTED] Subject: Telnet Program I need to write a program that telnets to a specific port and logs

RE: Hello all this grading program is still messing up

2002-05-23 Thread Beau E. Cox
Jim - That's a bit much for most of use to wade through... Can you try to find the part of it not working and just post that? I'm sure you will get a lot more help that way! Aloha => Beau. -Original Message- From: FLAHERTY, JIM-CONT [mailto:[EMAIL PROTECTED]] Sent: Thu

RE: Gettting Drives on Windows

2002-05-24 Thread Beau E. Cox
Hi Shishir - It was me, it's at <http://www.beaucox.com/perl/modules/getdrives/getdrives.html>. But as has been pointed out, CPAN has several better alternatives. Aloha => Beau. -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2

RE: explanation of tr///cds terms?

2002-05-24 Thread Beau E. Cox
Mark - I have ActivePerl on Win2K and 'perldoc' works fine. ActiveState should have put its 'bin' sub-directory in your path; 'perldoc.bat' is there. Aloha => Beau. -Original Message- From: mark [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24,

Making a binary distribution (ppm/ppd)

2002-05-24 Thread Beau E. Cox
good, I mean basic enough for me to understand) on building a 'PPD'. Can anyone point me in the right direction? Aloha => Beau. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: install crypt::passgen

2002-05-29 Thread Beau E. Cox
Hi - Are you, by chance, running Windows? If you use the ppm3 command: ppm> describe crypt-passgen you will note that this module is available for Solaris and Linux only. Aloha => Beau. -Original Message- From: Postman Pat [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

RE: union of times algorithm

2002-05-29 Thread Beau E. Cox
> $b } keys %ranges); my $elapsed = 0; $elapsed += $ranges{$_} - $_ for (keys %ranges); print "elapsed = $elapsed\n"; it outputs: 3 => 10 15 => 20 elapsed = 12 As you can see, I load the start/stop pairs into a hash (%ranges) with the key the start time, and the value the stop ti

RE: union of times algorithm

2002-05-29 Thread Beau E. Cox
} print "$_ => $ranges{$_}\n" for (sort { $a <=> $b } keys %ranges); my $elapsed = 0; $elapsed += $ranges{$_} - $_ for (keys %ranges); print "elapsed = $elapsed\n"; Aloha => Beau. -Original Message- From: Bryan R Harris [mailto:[EMAIL PROTECTED]] Sent: Wed

RE: roundoff error?

2002-05-30 Thread Beau E. Cox
Hi Refer to the first article of perldoc perlfaq4 Generally you should not use numeric comparisons on real numbers. Aloha => Beau. -Original Message- From: Bryan R Harris [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 12:02 PM To: [EMAIL PROTECTED] Subject: round

RE: getting a url with perl, the url_get library?

2002-06-03 Thread Beau E. Cox
Hi - Check out LWP::UserAgent and HTML::TokeParser. The following script gets my SETI@home stats. Flesh it out with you token parsing, better error handling, etc. Aloha => Beau. use strict; use warnings; use LWP::UserAgent; use HTML::TokeParser; my $url = &q

RE: Question- Archive::zip/tar

2002-06-05 Thread Beau E. Cox
gz, or something like bzip => .tar.bz. Of course, the modern 'tar' program will invoke a compression utility for you via command line switches. Most of the unix tarballs I have seen are in the .tar.gz format. I know this is like the blind leading the blind, but I hope it helps

RE: Help in Regular expression with array

2002-06-05 Thread Beau E. Cox
Hi - I don't think you can regex on a whole array; try this after you have loaded the array: for (@lines) {print "ok" if /Date:/; } This iterates the array lines presenting $_ for each iteration. The regex /Date:/ operates on $_. Aloha => Beau. -Original

Test::Harness and Text::FIGlet

2005-10-13 Thread Beau E. Cox
FIGlet->new( -d => "C:/Perl/FIGlet/fonts/ours" ); ok( $fig, 'new' ); 3) Run perl Makefile.PL && [n]make test ( look at all those warnings! ) 4) cd t && perl ftest.t ( NO warnings, right? ) This is an equal opportunity problem; it occurs on Windows ( Active

Re: ENV(Y)?

2005-10-14 Thread Beau E. Cox
ing like this: print "$_=$ENV{$_}\n" for sort keys %ENV; Or, with more keystrokes: for my $var( sort keys %ENV ) { print "$var=$ENV{$var}\n"; } Read up on hashes && good luck. >/G Aloha => Beau; [EMAIL PROTECTED] 2005-10-13 -- To uns

Re: Re: ENV(Y)?

2005-10-14 Thread Beau E. Cox
are/answerbooks/C/ab_cardcatalogLC_ALLCDTLOGINDISPLAYCLASSSunRayOSTY >>>> >>>>I envy you how can solve this... :-) >>>> >>> >>> You're almost there. %ENV is a hash, do you can do something like this: >>> >>> print "$

Re: using XS for calling exported methods from a DLL

2005-10-14 Thread Beau E. Cox
in, OUT => $out, }; Later the functions be called with: ppdrv_write( $this->{FUNCADDR}{OUT}, $this->{DATA}{BASE}, $byte, $val ); and ppdrv_read( $this->{FUNCADDR}{IN}, $this->{DATA}{BASE}, $byte ); If you want the complete module to copy/study/etc., let me know and I will send it to you off-list. Aloha => Beau; [EMAIL PROTECTED] 2005-10-14 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Re: Re: ENV(Y)?

2005-10-14 Thread Beau E. Cox
set an environmentvariable permanently from my program? >Isn't that possible in Perl? As far as I know, No. It's the way shells work...sorry. Someone please correct me if I am wrong. > > >/G >http://www.varupiraten.se/ > > [snipped] Alo

Re: white space between roam and act

2005-10-18 Thread Beau E. Cox
>print ".Thank you..\n"; >} > >else >{ > print "Sorry. Your request has not been sent for Roaming.\n"; >} >No virus found in this incoming message. >Checked by AVG Anti-Virus. >Version: 7.0.344 / Virus Database: 267.12.4/142 -

  1   2   3   4   >