Re: problems with scalar(@array)

2002-12-17 Thread Chris Ball
with the index $array[$#array+1]. So don't do that. :-) - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a | Q. How do you tell an extrovert techie from an introvert techie? | A. He looks at your feet rather than his own. -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: crypt()

2002-12-08 Thread Chris Ball
double-quotes in the useradd command look redundant. Try removing them, if it still doesn't work. They may been being processed as part of the username/password. Hope this helps, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a -- To unsubscribe, e-mail: [EMAIL

Re: use warnings; and #!/usr/bin/perl -w

2002-11-26 Thread Chris Ball
wouldn't see initialization warnings in that scope. Hope this helps. perldoc perllexwarn for some more.. - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: a question about output

2002-11-24 Thread Chris Ball
' for information about the $| variable. This doesn't help with storing the output from ls to a file rather than STDOUT, which should be done with something like: open(FILE, result) or die $!; print FILE `ls`; close FILE; - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger

Re: Advice wanted on project

2002-11-23 Thread Chris Ball
://www.bestpractical.com/rt/ . -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a | Banks use perl? Let me take my $money out. | Only banks for rich people. Banks for people like you use COBOL. | -- gale:[EMAIL PROTECTED], 2002-08-26. -- To unsubscribe, e-mail: [EMAIL

Re: Anyone know what Perl Jaguar is coming with?

2002-08-16 Thread Chris Ball
://archive.develooper.com/macosx%40perl.org/msg02650.html - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: What Modul for use with imap?

2002-07-29 Thread Chris Ball
search functions. I prefer the interface at http://search-beta.cpan.org/ . - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a Blessings to the chap who invented ice cream, ginger-pop and the rest! I'd rather invent things like that any day than rockets and bombs

Re: search and replace problem

2002-07-11 Thread Chris Ball
, though: Changes to $_ inside an FD are _not_ reflected back to a file. You can read 'perldoc -q How do I change one line in a file' for the suggested ways of doing modifications like this. Hope this helps, - Chris. -- Chris Ball | [EMAIL PROTECTED] | +44 207 677 2305 -- To unsubscribe, e

Re: Modules

2002-07-06 Thread Chris Ball
it in script with the use lib ; pragma or changing the bang-line to include -Idir. Outside of your script, you can manipulate the PERLLIB or PERL5LIB environment variables. - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a Blessings to the chap who invented ice cream

Re: CPAN viruses

2002-06-05 Thread Chris Ball
Helpful::Script'' - it's trivial to get a CPAN account, and new uploads aren't vetted. In theory, though, it's likely that such a module would be noticed very quickly indeed, and removed of anything harmful. Hopefully. - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger

Re: How to use crypt ??

2002-05-23 Thread Chris Ball
. Japhy has a page explaining crypt(), which should clear everything up for you. It's on-line at: http://www.crusoe.net/~jeffp/docs/crypt - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a chris@lexis:~$ perl -le'@a=($^O eq 'darwin')?qw(100453 81289 9159):qw

Re: equivalent of /* */

2002-05-21 Thread Chris Ball
, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a chris@lexis:~$ perl -le'@a=($^O eq 'darwin')?qw(100453 81289 9159):qw (23152 19246 2040);while(){chomp;push @b,$_ if grep {$.==$_}@a}push @b,$^X;print ucfirst join( ,@b[2,0,3,1]).,'/usr/share/dict/words

Re: FIle upload

2002-05-20 Thread Chris Ball
, and not to Perl itself at all. - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a chris@lexis:~$ perl -le'@a=($^O eq 'darwin')?qw(100453 81289 9159):qw (23152 19246 2040);while(){chomp;push @b,$_ if grep {$.==$_}@a}push @b,$^X;print ucfirst join( ,@b[2,0,3,1]).,'/usr/share

Re: help!

2002-05-18 Thread Chris Ball
. :-) The post I'm thinking of is at: http://archive.develooper.com/beginners%40perl.org/msg16089.html - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: the homework assignment problem

2002-05-18 Thread Chris Ball
that we're talking about something that could be any variable. You can read about them at: http://www.tuxedo.org/jargon/html/entry/metasyntactic-variable.html - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: urandom

2002-05-16 Thread Chris Ball
Any ideas how I could code this, or is there a better way Postman of actually getting random stuff. Someone beat you to it. :) The Crypt::Random CPAN module is an interface to /dev/random (and /dev/urandom). - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris

Re: Perldoc

2002-05-16 Thread Chris Ball
with: perldoc perltoc - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Perldoc

2002-05-16 Thread Chris Ball
the replies. I've submitted a documentation patch on this and it's been applied to the 5.8 tree. There'll be mention of perltoc as a good place to start on the `perldoc perldoc` page in that release. Hope this helps, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris

Re: SFTP

2002-05-15 Thread Chris Ball
. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: TIMTOWTDI

2002-05-12 Thread Chris Ball
jn == josenyimi [EMAIL PROTECTED] writes: jn The task is simply to upercase the first char of a given string jn and lowercase the rest. $string = ucfirst lc $string; Nice try, though. :-) - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris

Re: Pattern Matching...

2002-05-09 Thread Chris Ball
-- void:chris~ Hope this helps, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a Never go in against a Sicilian when _death_ is on the line! - Vizzini -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Script Versioning

2002-05-04 Thread Chris Ball
some ideas, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a Never go in against a Sicilian when _death_ is on the line! - Vizzini -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: I want to make sure I get this right

2002-05-02 Thread Chris Ball
and perl and Python and Perl look OK, while awk and Perl and Python and perl do not. But never write PERL, because perl isn't really an acronym, apocryphal folklore and post-facto expansions notwithstanding. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger

Re: Parameters

2002-05-02 Thread Chris Ball
that $argument{1,2} don't contain special chars $argument1 =~ s/[^A-Za-z0-9:\.]//; $argument2 =~ s/[^A-Za-z0-9:\.]//; do_something_with($argument1, $argument2); Hope this helps, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a As to luck, there's

Re: Problem accessing the command line arguments

2002-05-02 Thread Chris Ball
. Hope this helps, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a As to luck, there's the old miners' proverb: Gold is where you find it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Cygwining off Re: perlcc - newbie - cannot compile successfully - sample sessio n

2002-04-20 Thread Chris Ball
, in Text/: lexis:chris...perl5/5.7.2/Text % ls Abbrev.pm Balanced.podSoundex.pm Wrap.pm Balanced.pm ParseWords.pm Tabs.pm Hope this helps. - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a As to luck, there's the old miners' proverb: Gold

Re: Is anyone using the Google API?

2002-04-20 Thread Chris Ball
, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a As to luck, there's the old miners' proverb: Gold is where you find it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Is anyone using the Google API?

2002-04-20 Thread Chris Ball
Me == Chris Ball [EMAIL PROTECTED] writes: Me I was wondering whether it would be worthwhile creating a CPAN Me module - something like WWW::Google::SOAP - to allow simple Me searches with the SOAP API, returning a nice hash. Looks like Me it might be.. ... and it also looks

Re: Funny character on a dir name.

2002-04-18 Thread Chris Ball
to a file. But this really is very off-topic. :-) - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a As to luck, there's the old miners' proverb: Gold is where you find it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Convert Number In Strings to Numeric Form

2002-04-15 Thread Chris Ball
; # an ascending numerical sort. instead of: @results = sort @array; # which is equal to sort {$a cmp $b} @array. The difference is '=' (numerical comparison) against 'cmp' (lexical comparison). Hope this helps. perldoc -f sort for more information. - Chris. -- $a=printf.net; Chris Ball | chris

Re: Executing Shell Commands

2002-04-15 Thread Chris Ball
; Chris Ball | chris@void.$a | www.$a | finger: chris@$a As to luck, there's the old miners' proverb: Gold is where you find it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: command line arguments

2002-03-06 Thread Chris Ball
but is there any other way Nikola around it? Not as far as I know. 'script.pl file1\* \*file2\*' will pass them untouched, if you have access to what's happening at the shell level. - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a In the beginning

Re: Still can't extract data using HTML::TokeParser

2002-02-25 Thread Chris Ball
. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a 1 is equal to 2 for sufficiently large values of 1. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: What would take care of this?...

2002-02-22 Thread Chris Ball
all data from H1/TITLE /HEADBODY Daniel BGCOLOR=FFh1I want all if this data extracted from Daniel heading 1 (h1)/h1 /BODY/HTML while ($stream-get_tag(h1)) { $data = get_trimmed_text(/h1); } (Also see perldoc HTML::TokeParser, once it's installed.) - Chris. -- $a=printf.net; Chris Ball

Re: What would take care of this?...

2002-02-22 Thread Chris Ball
effectively impossible to parse HTML accurately with regexps. - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a In the beginning there was nothing, which exploded. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: file size

2002-02-22 Thread Chris Ball
the size of $filename in bytes. More information at perldoc -f stat, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a In the beginning there was nothing, which exploded. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: Perl calling Visual Basic

2002-02-22 Thread Chris Ball
that can be entirely executed from the command line and returns a useful return code - I don't have familiarity with VB, but my short experiences seem to suggest that this would be rare. *awaits correction from Japhy* :-) - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris

Re: Web Address for Archives

2002-02-18 Thread Chris Ball
://archive.develooper.com/beginners%40perl.org/ Hope this helps, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a In the beginning there was nothing, which exploded. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Urgent - Getting the left most 3 characters from a string...

2002-02-14 Thread Chris Ball
(three digits), and note the == to make a comparison rather than an assignment. Hope this helps, - Chris. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a In the beginning there was nothing, which exploded. -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: A few Great Modules

2002-01-20 Thread Chris Ball
. I'm also still an HTML::TokeParser geek. TokeParser allows you to grab the contents of HTML tags, even if there's a complex structure to the page defining which tags you want to take and which you don't. Hope either of these spark someone's interest. - Chris. -- $a=printf.net; Chris Ball

Re: USE IMPORT REQUIRE

2002-01-06 Thread Chris Ball
, but as a special subroutine name; described in perldoc -f import. 'import Some::Module' is not valid perl code. Hope this helps, - ~C. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a As to luck, there's the old miners' proverb: Gold is where you find it. -- To unsubscribe, e

Re: database to mail

2001-12-24 Thread Chris Ball
; # Remove (p|P) for each array element. Hope this helps. Merry Christmas, list! - ~C. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a As to luck, there's the old miners' proverb: Gold is where you find it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: summarizing a list of numbers?

2001-12-17 Thread Chris Ball
of interest, what sort of UNIX command _needs_ a list like that instead of an explicit one? - ~C. void:chris~ % cat compact.pl #!/usr/bin/perl -w # Author: Chris Ball [EMAIL PROTECTED] # Function: Provide a 'compact list' for an array of numbers. # Also at: http://printf.net/compact.pl my

Re: summarizing a list of numbers?

2001-12-17 Thread Chris Ball
_me_ a regexp master yesterday. Sigh. I wrote: I'll bow down to anyone who can make a one-liner of it, naturally. It reduced a sizeable algorithm down to one simple regex: s/\b(\d+)(?:,((??{1+$+})\n))+/$1-$+/g; fx: Chris bows deeply and respectfully - ~C. -- $a=printf.net; Chris Ball

RE: summarizing a list of numbers?

2001-12-17 Thread Chris Ball
On Mon, 2001-12-17 at 15:46, Jeff 'japhy' Pinyan wrote: It certainly puts my C-like code to shame. It's very nice. And even more so to my code. Very well written, Bob. - ~C. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a In the beginning there was nothing

Re: Win32::Console.

2001-12-13 Thread Chris Ball
and sample usage for each function. The [EMAIL PROTECTED] mailing list would be a good place to follow-up to if you still have questions. - ~C. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a As to luck, there's the old miners' proverb: Gold is where you find

Re: Win32::Console.

2001-12-13 Thread Chris Ball
at all. Oops. - ~C. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a As to luck, there's the old miners' proverb: Gold is where you find it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Opening a URL

2001-12-07 Thread chris . ball
On Fri, 2001-12-07 at 17:19, Juan Manuel Espinoza wrote: How can i open a URL in PERL? With the 'LWP' modules. In this case, putting the HTML to Google's front page in $content: use LWP::Simple; my $content = get( http://www.google.com/; ) or die $!; Hope this helps, - ~C. -- Chris Ball

Re: thanks for the info on removing control m's

2001-12-06 Thread Chris Ball
| perl -nle 'print substr($_, -3, 3)' [ -3 makes us start here ^, 3 makes us travel for three characters. ] Left can be done with substring (x,0) I am sure Yes, indeed: echo abcdefgh | perl -nle 'print substr($_, 0, 3)' Hope this helps, - ~C. -- $a=printf.net; Chris Ball | chris@void.$a | www

Re: 'vacation'

2001-11-27 Thread Chris Ball
reject based on this hash. It's probably overkill for me, but it sounds like you get enough spam to use it - assuming you have control of the machine your mail comes to. (which I'll assume, based on your mail address of webmaster@) Just an idea, - ~C. -- $a=printf.net; Chris Ball | chris@void

Re: SALT in CRYPT!!

2001-11-22 Thread chris . ball
. -- Chris Ball E-mail: [EMAIL PROTECTED] Web Programmer Web : www.fastsearch.com Fast Web Media Ltd Mobile: +44 (0)7769 903 770 12th Floor Sunlight House, Quay Street, Manchester M3 3JZ, UK. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: recommended perl training in UK?

2001-11-13 Thread Chris Ball
example. [2]: Simon Cozens' NetThink comes to mind - http://www.netthink.co.uk/ -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris@$a In the beginning there was nothing, which exploded. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: Trying to use the = notation to print the values from this hash

2001-11-13 Thread Chris Ball
to know that the environmental variables that your hash represents are already available from within perl, in the %ENV hash. For example, 'print SHELL = $ENV{'SHELL'}; will also work as expected. Hope this helps, ~C. -- $a=printf.net; Chris Ball | chris@void.$a | www.$a | finger: chris

Re: Off-Topic (200%) - Where are you from?

2001-11-10 Thread Chris Ball
language. /me :-) ~C. -- Chris Ball. [EMAIL PROTECTED] || http://printf.net/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]