RE: Is there a simple way to include source code I've written in other files?

2003-07-17 Thread Charles K. Clarkson
. Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Padding a record with zero's in a file

2003-07-17 Thread Charles K. Clarkson
) { push @amounts, (split ' ')[0]; } my $total = 0; $total += $_ foreach @amounts; printf \$ %s\n, $total/100; __END__ 18822 188.22 1331.33 2300 23.00 222003 `2220.03 Assuming that each line in the file is valid. Charles K. Clarkson -- Head

RE: fast match count of char in string

2003-07-17 Thread Charles K. Clarkson
a characters in the string; HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Hash to array of arrays

2003-07-14 Thread Charles K. Clarkson
18 19 21 22 22 : 22 23 23 24 25 25 26 26 27/ ], : [qw/ 15 15 16 16 17 18 19 20 21 21 22 : 22 23 23 24 24 24 24 24 25/ ], [snipped some] HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328

RE: A thank you gift

2003-07-14 Thread Charles K. Clarkson
as well do it case-insensitively also. my $regex = join '|', keys %triggers; while ( STDIN ) { s/($regex)/$triggers{$1}$1${normal}/iog; print; } HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe

RE: checkbox label font

2003-07-11 Thread Charles K. Clarkson
:Arial; display:inline; } Check out http://www.w3.org/TR/REC-CSS2/ for more info on CSS. Note that font-family should really include more than one font if you want good control. Fortunately, there is a whole chapter on fonts at the above link. HTH, Charles K. Clarkson

RE: Display timing

2003-07-10 Thread Charles K. Clarkson
, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: split function problem.

2003-07-09 Thread Charles K. Clarkson
strict; use warnings; use Data::Dumper; my $name_with_id = Deiley, Sara Jr., 1234; print Dumper [ split / (\d{2,5})$/, $name_with_id ]; __END__ HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail

RE: split function problem.

2003-07-09 Thread Charles K. Clarkson
Sara [EMAIL PROTECTED] wrote: : : One more question I searched the google for : HTH abbreviation but didn't find anything. : : Can you tell me what does it mean? Hope That Helps And sometimes: Hotter Than Hell :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE: Substituting a space with a comma

2003-07-09 Thread Charles K. Clarkson
K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Substituting a space with a comma

2003-07-09 Thread Charles K. Clarkson
K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: CGI Module Reference

2003-07-08 Thread Charles K. Clarkson
, at ActiveState, etc. You could probably find a whole bunch of links and other information about CGI.pm from a google search, but you probably did that before you asked. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328

RE: Hash of anon arrays

2003-07-07 Thread Charles K. Clarkson
a question ends with a question mark. :) How do I push 'item3' onto the array? push @{ $hash{key} }, 'item3'; HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: underlining full text

2003-07-07 Thread Charles K. Clarkson
N, Guruguhan [EMAIL PROTECTED] wrote: : : I would like to know how to underline entire : text using -underline option? Perl doesn't (to my knowledge) have an underline option. What Are you on the right list? HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy

RE: perl line breaks...

2003-07-06 Thread Charles K. Clarkson
+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+ 3+4+5+6+7+8+9+0+1+2+3+4+5+6+7+8+9+0+1+2+3+4 ; HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

RE: testing an argument's type

2003-07-05 Thread Charles K. Clarkson
a reference being passed as the first argument. sub function { die error message if ref $_[0]; . . . } HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL

RE: -w vs. use warnings

2003-07-02 Thread Charles K. Clarkson
Michael, Read 'perlexwarn' in the perl documentation for a complete discussion. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: While loop, confused...

2003-07-02 Thread Charles K. Clarkson
Bill Akins [EMAIL PROTECTED] wrote: : : while (($type ne Windows) || ($type ne Linux)) { This will always be true. Try: while ( $type ne 'Windows' $type ne 'Linux' ) { ^^ HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile

RE: HOWTO:Dynamically getting all of the global variables and their v alues

2003-07-01 Thread Charles K. Clarkson
is used. This still imports everything to the main namespace and since constants are traditional ALLCAPS, provides the next programmer to easily recognize that they may indeed be constants imported into the script. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc

RE: Perl CGI newbie

2003-06-29 Thread Charles K. Clarkson
to a file/TITLE/HEAD\n; : print BODYH1Thank you $test.../H1/BODY/HTML; HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: find uniq paths in @INC

2003-06-28 Thread Charles K. Clarkson
Harry Putnam said: : : Here is the problem: : : Summary run home made tools against only the : uniq paths that might contain perl *.pm files. Harry, that doesn't' make a bit of sense. Could you rephrase the question? Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc

RE: Why should I create an object? (long)

2003-06-27 Thread Charles K. Clarkson
-start_html(), $q-district_1_popup(), $q-end_html(); __END__ When we call $q-start_html() our module calls CGI.pm with default arguments. The new method (district_1_popup) calls CGIs popup_menu() method and returns the pre-defined states. HTH, Charles K

RE: Packages, run modes, and scopes, oh my

2003-06-27 Thread Charles K. Clarkson
Have you seen the tutorials at perlmonks? http://www.perlmonks.com/index.pl?node=Tutorials HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: perl redirection

2003-06-25 Thread Charles K. Clarkson
Location: ../index.php Don't use both. the CGI redirect should be used instead of print Content-type: text/html\r\n\r\n; HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED

RE: Mastering Learning Perl on Win 32 Systems

2003-06-25 Thread Charles K. Clarkson
. Windows is not a command-line driven environment. Stop trying to adapt it to one. You can always learn more about the command-line later. For now, I would recommend skipping the input part of the example programs and concentrate on the concept being taught. HTH, Charles K. Clarkson -- Head

RE: Array Question

2003-06-25 Thread Charles K. Clarkson
Anthony Beaman [EMAIL PROTECTED] wrote: : : I still can't grab the element of an array that : requests user input though. Forget about the user input part. You're getting hung up on the wrong concept. The exercise is about arrays not user input. HTH, Charles K. Clarkson -- Head Bottle

RE: The newline blues

2003-06-25 Thread Charles K. Clarkson
/ ) { push @out, join '', reverse @chunk; @chunk = (); } } last if @out == $count; } print $_-- \n foreach reverse @out; HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail

RE: Last Post today I swear - use in package

2003-06-24 Thread Charles K. Clarkson
On Tuesday, June 24, 2003 at 4:15 PM, Dan Muey stated: : : This is last post for me today I swear!!! But . . . On Tuesday, June 24, 2003 at 4:38 PM, Dan Muey posted: : Cool, Thanks again Jenda, it's coming slowly, : bit by bit. Just can't trust that guy! :) Charles K. Clarkson

RE: Why

2003-06-23 Thread Charles K. Clarkson
line interface on a windows platform would really lower the usage of your program though. Windows users want GUIs. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED

RE: readir

2003-06-22 Thread Charles K. Clarkson
@files = sort { $a-[1] cmp $b-[1] } @files; # Descending first column sort @files = reverse sort { $a-[0] cmp $b-[0] } @files; # Descending second column sort @files = reverse sort { $a-[1] cmp $b-[1] } @files; HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home

RE: Removing entries from an array

2003-06-20 Thread Charles K. Clarkson
: http://www.perldoc.com/perl5.8.0/pod/perlfunc.html HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: readir

2003-06-20 Thread Charles K. Clarkson
( sub{ push @files, [ $_, $File::Find::dir ] }, 'c:/perl/bin/' ); HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Capture a printing function into an array

2003-06-17 Thread Charles K. Clarkson
Harry Putnam wrote: : : Mark G [EMAIL PROTECTED] writes: : : Nothing @all. you don't need to do $., $. is : fine by it self so can scrap that to : printf %s %s %-28s %s\n, $., $2, $4, $6; : : I wanted the brackets in the output. printf %s %s %-28s %s\n, $., $2, $4, $6; HTH, Charles K

RE: Is empty directory?

2003-06-16 Thread Charles K. Clarkson
John W. Krahn [EMAIL PROTECTED] wrote: : : From: Charles K. Clarkson [EMAIL PROTECTED] : : sub IsEmptyDir { [snip] : return $count ? 0 : 1; : : You could just return $count; which will do the right thing. We are testing for an empty condition. When the count is 0 the function

Style ( was:Capture a printing function into an array )

2003-06-16 Thread Charles K. Clarkson
/Dst/g; $$line =~ /^[^ ]+, (\d[^ ]+ \d[^ ]+).*(Src[^ ]+ \d+).*(Dst[^ ]+ \d+)/; $$line = ''; return sprintf %s %s %-28s %s\n, $line_number, $1, $2, $3; } return ''; } HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy

RE: Subroutine Syntax

2003-06-15 Thread Charles K. Clarkson
: up a syntax error at sub error {, The previous line doesn't end with ';'. : and another syntax error at if($_[0]=1){ This is because warnings is on (see above). HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328

RE: help needed on text file/String manipulation

2003-06-14 Thread Charles K. Clarkson
, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Returning the first key in a hash...

2003-06-12 Thread Charles K. Clarkson
is. Show us what you're working on and we can help you find a solution. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Returning the first key in a hash...

2003-06-12 Thread Charles K. Clarkson
a hashing algorithm. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 #!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %hash = ( aa = 3 ); print initial_key( \%hash ), \n; my @keys = 'e' .. 'n'; @hash{ @keys } = 1

RE: Perl -w odd error

2003-06-12 Thread Charles K. Clarkson
: possible typo at : ./OrderTakingTree.pl : line 151. The error I get is: Name main::FILE used only once: possible typo at . . . Are you sure it was CNTFILE and not FILE? @FILE _is_ used only once. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home

RE: hex to dec and dec to hex

2003-06-11 Thread Charles K. Clarkson
. Are you aware of 'sprintf'? my $decimal_value = 10; my $hex_value = sprintf '%x', $decimal_value; HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

RE: There is virus attached : Re: Age Of Empires - Cheats

2003-06-10 Thread Charles K. Clarkson
spam filters, but Microsoft Outlook blocked the file from being opened. Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: br -- problem caused by Package?

2003-06-07 Thread Charles K. Clarkson
under strict. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: br -- problem caused by Package?

2003-06-07 Thread Charles K. Clarkson
under strict. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Is empty directory?

2003-06-06 Thread Charles K. Clarkson
unless -d $_[0]; opendir my $dh, $_[0] or die $!; my $count = () = readdir $dh; return $count - 2; } HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Have script exec itself (was: Flush Everything)

2003-06-06 Thread Charles K. Clarkson
question and I don't know what advantages this might have, TIA, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Regex Consult

2003-06-04 Thread Charles K. Clarkson
, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Passing arrays/associative arrays into subroutines ... how?

2003-06-02 Thread Charles K. Clarkson
', favorite_hobby = 'burping', favorite_vacation_spot = 'Cancun', } } which just sends an anonymous hash. Call these like this: my $wombatStats = GetWombat(); my $description = DescribeCritter( $wombatStats ); print $description; HTH, Charles K. Clarkson

RE: Reference to an array from within a hash....how to de-ref.

2003-06-02 Thread Charles K. Clarkson
', ', @{ $hostsref-{$key} }; print \n; } HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 Use strict and warnings: http://www.perlmonks.com/index.pl?node_id=111088 -- To unsubscribe, e-mail: [EMAIL PROTECTED

RE: Wanted: Help with Function Arguments

2003-06-01 Thread Charles K. Clarkson
'); HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Returning arrays from subroutines... how?

2003-06-01 Thread Charles K. Clarkson
'} = 1; $result{woodchuck} = 6; return %result; } Also use GetMarmots() instead of GetMarmots to call this sub. Read 'perlsub' for more info. foo; is the same as: foo( @_ ); # and disable prototypes That may not always be what you want. HTH, Charles K. Clarkson -- Head

RE: Is a way to pass the reference of a object to subroutine?

2003-05-30 Thread Charles K. Clarkson
$CGI-header(), : $cgi-start_html(), Perl is case-sensitive $CGI and $cgi are two _different_ variables. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

RE: Can someone find out what's wrong ?

2003-05-30 Thread Charles K. Clarkson
expect? What would you like it to produce? HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Newbie not getting expected values from s/// operator

2003-05-30 Thread Charles K. Clarkson
of substitutions made. Otherwise it returns false (specifically, the empty string). : } : : Doing a print on $tmp, yeilds : : 1 Which means there was 1 replacement on each pass. my $tmp; while ( PROPS ) { $tmp .= $_ if s/photoshop:([^]+)([^]*)/$1: $2/; } HTH, Charles K. Clarkson

<    3   4   5   6   7   8