Re: Cant seem to understand

2003-06-06 Thread Frank Wiles
able match. So if $date contained: Thu Jun 5 10:04:03 CDT 2003 $1 would contain '10'. $2 would contain '04'. $3 would contain '03'. Hope this helps. - Frank Wiles <[EMAIL PROTECTED]> http://fra

Re: cgi LWP::Simple script and Apache

2003-06-04 Thread Frank Wiles
k need an outbound SMTP server to relay their E-mail through. This mostly due to the dial-up nature/roots of the Internet. Since the "client" wasn't going to be online 24/7 it needed to drop off the E-mail on an SMTP server so that the server could repeatedly try to

Re: Enumerating available modules

2003-03-28 Thread Frank Wiles
use File::Find; my $count = 0; find(\&wanted, @INC); sub wanted { if( $_ =~ /\.pm$/ ) { print "$count: $File::Find::name\n"; $count++; } } ----- Frank Wiles <[EMAIL PROTECTED]

Re: Why?

2003-03-25 Thread Frank Wiles
following it would work as expected: perl -e '@NEW = split(/\./, "1.2.3"); print "x", $NEW[1], "x\n"; ' The forward slashes denote the start/end of the pattern and the backslash says to use a literal period as oppose

Re: getting the number of characters

2003-03-12 Thread Frank Wiles
ar, you'll want to modify this to be: ($match) = $num =~ /(\d)$/; or if there is always there characters you can also do this: ($match) = $num =~ /\d\d(\d)/; ----- Frank Wiles <[EMAIL PROTECTED]>

Re: using ParseExcel::Simple to get worksheet name

2003-03-05 Thread Frank Wiles
ed at this much, but I'm betting it has to do with the fact you use several different my'ed versions of the scalar '$sheet' throughout. Try naming them something unique based upon what they hold and I bet you'll work your own problem out. ---

Re: Random access files in Perl????

2003-03-04 Thread Frank Wiles
similar concepts to sequential and random access files. They aren't much like GW Basic however. I would suggest reading up on on your Perldoc for open() and sysopen(), probably reading the Perl Cookbook would be a good idea to get a better

Re: perl with linux xinetd

2003-03-04 Thread Frank Wiles
PeerAddr' => 'xxx.xxx.xxx.xxx', 'PeerPort' => '209', 'Proto' => 'udp') or die "cannot connect: $!\n"; print $sock "$ARGV[0]\r\n"; $sock->close();

Re: Crypt::Blowfish errors on line 56

2003-02-28 Thread Frank Wiles
.--[ Frank Wiles wrote (2003/02/28 at 16:20:37) ]-- | | .--[ Tyler Longren wrote (2003/02/28 at 16:15:27) ]-- | | | | I found that if I change $data to "12345678", it works. How can | | I encrypt a string that has more than 8

Re: Crypt::Blowfish errors on line 56

2003-02-28 Thread Frank Wiles
ions together for you. ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: parsing a datafile.

2003-02-04 Thread Frank Wiles
my $first_field = substr($data, $offset, 10); $offset += 10; my $second_field = substr($data, $offset, 15); $offset += 15; my $third_field = substr($data, $offset, 40); $offset +=40; } - Frank Wiles <[EMAIL P

Re: Search Replace

2003-02-03 Thread Frank Wiles
a way to do this all at once? | | $_=~s/($\s+)||(\s+^)||(\$)//g foreach (@fields); | I have also tried | $_=~s/[($\s+)(\s+^)(\$)]//g foreach (@fields); | `- Try this regex instead: s/(?:^\s+|\$+|\s+$)//g --

Re: A better way, a perl way?

2003-01-22 Thread Frank Wiles
x27;m assuming you are wanting to remove all entries in @data that begin with a space, this will do it in one line: @data = map( { if( $_ !~ s/^ //) { $_; } }, @data); - Frank Wiles <[EMAIL PROTECTED]> http://fran

Re: Removing a name from a list - advanced regexp - TIMTOWTDI

2002-12-11 Thread Frank Wiles
$list =~ s|/$name||; $list =~ s|^/||; If it's at the end, it will remove the last /. If it's in the middle it will fill in correctly. If it's on the front the second regex will take care of it. --------- Frank Wiles <[EMAIL PROT

Re: how can I grab the first line from a text file

2002-11-20 Thread Frank Wiles
my $first_line = ; close(IN); ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: random strings

2002-11-14 Thread Frank Wiles
like to have available to the @letters array such as symbols, numbers, etc. You can adjust the length by changing the for ( 1 ... 8 ) to say for ( 1 ... 10 ) to make it 10 characters long. - Frank Wiles <[EMAIL PROTECTED]> http://frank.wi

Re: some doubt!

2002-11-12 Thread Frank Wiles
prefix_file . $log ; | | $probefile = " ) { } You might want to re-read perldoc -f open. ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Perl question

2002-11-12 Thread Frank Wiles
my $localtime_minus_two = localtime($day_two); I hope that makes sense. - Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: File::Find cache?

2002-11-11 Thread Frank Wiles
keeping it in memory, or being out of date as the operating system will handle both of those issues for you automagically. ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [

Re: ERROR :Simple, but maybe not so simple

2002-10-31 Thread Frank Wiles
nnot write to the location it is trying to install to then make install will fail. ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: howdo I make output from a print statement look pretty?

2002-10-31 Thread Frank Wiles
ormats. Or see perldoc -f format or man perlform for more info. ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Silly question

2002-10-31 Thread Frank Wiles
If you have variables or special characters ( i.e. \n, \t, etc ) in a string enclosed by ""s then they will be replaced with their values. If you have them enclosed in ''s they will be used literally. Hope that helps. -

Re: ERROR :Simple, but maybe not so simple

2002-10-31 Thread Frank Wiles
location you are trying to install to. So if you did: perl Makefile.PL PREFIX=/System/Library/Perl/ You'll need write permission in /System/Library/Perl. Not being a Mac OS X user, is /System/Library/Perl the default library location? --

Re: Simple, but maybe not so simple

2002-10-31 Thread Frank Wiles
which is /home/sean/ you'll need to do the following: perl Makefile.PL PREFIX=/home/sean/ make make install Then you will not need root/admin privileges, you will however need to modify @INC to know to look in the directory you choose for the library. ----

Re: Question about seek, Was: Trailing 5 lines of a file

2002-10-31 Thread Frank Wiles
bytes" it's simply saying seek to size - 2 which happens to be 2 bytes before the end. Does that make sense? ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EM

Re: Question about seek, Was: Trailing 5 lines of a file

2002-10-31 Thread Frank Wiles
the Cookbook for more info on using seek(). - Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: again about php and perl

2002-10-30 Thread Frank Wiles
e and black for Halloween you end up only modifying HTML templates and not having to muck with and possibly re-debug your Perl CGIs. Hope this helps. ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org ---

Re: the tilde and File::Spec?

2002-10-29 Thread Frank Wiles
directory'. So the example was trying to say '/home/user/perl_practice/myfile' by using the '~/perl_practice/myfile' shortcut. You'll need to expand the ~ on your own if you want it to be useful. -

Re: Use of uninitialized value at ./tablecomp.pl line 780, chunk 299

2002-10-24 Thread Frank Wiles
some point no matter what is contained in the file 3) Make sure the contents of the file you are reading have values for all possible fields/values/etc. Hope this helps. - Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org --

Re: Array modification

2002-10-22 Thread Frank Wiles
X' . $second . '' . $third; my @new_array = split(/\s/, $new_str); This is probably not the most optimal way to handle this, but it should have the desired result. ----- Frank Wiles <[EMAIL

Re: Nice

2002-10-18 Thread Frank Wiles
t change unless it is reset by a user. As for setting it you'll want to look into the program /bin/nice. ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL

Re: comparing two hashes

2002-10-16 Thread Frank Wiles
x27;foobar'; This sets hash1's value at key '2' to 'foobar'. Or am I misunderstanding your question? ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - | Subject:Re: compar

Re: comparing two hashes

2002-10-16 Thread Frank Wiles
( keys(%hash1) ) { if( $hash1{$key} ne $hash2{$key} ) { print "hash1: $hash1{$key} hash2: $hash2{$key}\n"; } } ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org --

Re: another regexp question

2002-10-14 Thread Frank Wiles
^binaries\\/o ) { push(@array2, $file); } else { push(@array3, $file); } } NOTE: The 'o' on the end of the regular expression matches instructs the perl interpretor to only compile the regex once, as it doesn't change during

Re: variable problems

2002-10-14 Thread Frank Wiles
ement just before $res->nameservers($nameserver1) and print out $nameserver1 to make sure there is data in that hash position. - Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Joining array elements

2002-10-08 Thread Frank Wiles
Hope this helps. ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: syslog output parsed by a perl script

2002-10-08 Thread Frank Wiles
like a standard file. Hope this helps. ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Can Someone Help Me?

2002-09-30 Thread Frank Wiles
works, this may not even be possible. However to for an easy way to get every third day I would suggest you look at Date::Calc or Date::Manip modules on cpan.org as they have several easy functions for working with dates. - Frank Wiles <[EMAIL P

Re: Removing a directory

2002-09-24 Thread Frank Wiles
be careful, as you can easily blow away your system if you do a rm -rf / ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: how to find memory leaks?

2002-09-21 Thread Frank Wiles
ore easily ported, etc? ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Loading hash from DBI

2002-09-11 Thread Frank Wiles
); You'll probably want to read up on Perl references in the perlref man page. - Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Large files

2002-09-11 Thread Frank Wiles
. You say that if you remove from the line up and from the line down it works. See if it works if you remove just the 111th line. If it works then, then there is something different about that line that is causing your code to error. ----- Fran

Re: Newbie question - Can smtp send attachments?

2002-09-04 Thread Frank Wiles
le to do with Net::SMTP. I would suggest you take a look at MIME::Lite, it makes it very very easy. - Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Perl taking a long time to exit? Freeing memory?

2002-09-04 Thread Frank Wiles
ich are local to some subroutines that are traversed recursively it might take Perl that long to back out all of the way free()'ing as it goes. --------- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - --

Re: DBI script won't run as cron job

2002-08-29 Thread Frank Wiles
ement: $DBI::errstr\n"; | $dbh1 ->disconnect(); | print "\n\n *** LOGGED OUT OK \n\n"; | exit; | `- You'll need to make sure that CRON has all the same environment variables and is running as the same user

Re: where to put data files

2002-08-22 Thread Frank Wiles
fine where the data and temp files should go. I'm not familiar with Windows so I wouldn't be much help there. ----- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL

Re: Is there a way to do cron on windows?

2002-08-20 Thread Frank Wiles
. - Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Large Insert statements

2002-05-16 Thread Frank Wiles
I would first suggest taking another look at your table design. Having 500 columns in a table is most likely not a thing you really want to do. But if you must, then yes you will have to put in 500 ?'s into your prepare. - Frank Wiles &l

Re: How do I delete a file

2002-05-15 Thread Frank Wiles
ally delete the unused files ? > Any help would be greatly appreciated Use the unlink() function. perldoc -f unlink ----- Frank Wiles <[EMAIL PROTECTED]> Revolution Systems, LLC. - -- To unsubscribe, e-m

Re: Parameters

2002-05-02 Thread Frank Wiles
pt as: $ARGV[0] = 'file1' $ARGV[1] = 'file2' $ARGV[2] = 'file3' You may also want to look into using Getopt::Std or Getopt::Long to do more interesting commandling arguments handling. - Frank Wile

Re: Perl Issue

2002-05-01 Thread Frank Wiles
s it will launch 5 Perl interpretors. You can avoid this by using mod_perl which shares the interpretor inside of Apache itself. --------- Frank Wiles <[EMAIL PROTECTED]> Revolution Systems, LLC. - -- To unsubscribe,

Re: Filtering HTML

2002-05-01 Thread Frank Wiles
t <>'s as data because they would need to be < and > if the HTML is valid. Hope this helps. - Frank Wiles <[EMAIL PROTECTED]> Revolution Systems, LLC. - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Pass variables from parent to child script

2002-04-30 Thread Frank Wiles
er words, can you replicate the export functionality of a UNIX shell > script using PERL? You can always set enviromental variables, just like a shell. However, depending on the application this can cause some pretty serious security issues. --------

Re: DBD-ODBC - WIN2K - ACCESS

2002-04-26 Thread Frank Wiles
code change for readability and reducing the amount you have to type. Try: while( my ($id, $name, $par, $time) = $sth->fetchrow ) { } Instead of 'my'ing each variable. You might also try putting the start_html() outside of the while{} block and just loo