Re: Crypt::Blowfish errors on line 56

2003-02-28 Thread Tyler Longren
I found that if I change $data to "12345678", it works. How can I encrypt a string that has more than 8 characters? Thanks, Tyler - Original Message ----- From: "Tyler Longren" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 28, 2003

Crypt::Blowfish errors on line 56

2003-02-28 Thread Tyler Longren
Hi Folks, The code at http://longren.no-ip.org/tyler/blowfish.pl encrypts some $data. Once the data is encrypted, the hex value should be stored in $ciphertext. $plaintext should have the original data that's in $data. When I run this code, I recieve this error: "input must be 8 bytes long at /us

Mcrypt module

2003-02-26 Thread Tyler Longren
Hi, I haven't written anything in perl for quite some time, so I'm pretty rusty. Does anyone have a perl version of this PHP code: function encrypt($string, $key) { // version 2.4.x of lib mcrypt $td = mcrypt_module_open (MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); $iv = mcrypt_create_iv (mcry

Re: Books on "Network programming in Perl"...

2002-07-16 Thread Tyler Longren
yes, perl can be used on NT and other windows variants. On Wed, 17 Jul 2002 08:48:12 +0530 "Parag Dhake" <[EMAIL PROTECTED]> wrote: > > Hi Everybody, > >I'm new to this mailing list (and to the world of Perl, as well) >Would appreciate if you can suggest me some good books on "Network

Re: Moving on....

2002-06-18 Thread Tyler Longren
Gary, I tried the code you posted, and it has the same problem mine did. tyler On Tue, 2002-06-18 at 11:17, Gary Stainburn wrote: > On Tuesday 18 June 2002 5:08 pm, Tyler Longren wrote: > > Hello, > > Hi, > > > > > I have an smp machine that I want to run two

RE: Moving on....

2002-06-18 Thread Tyler Longren
353 8437 > Tel Worldwide:+1 801 736 0806 > E-mail: [EMAIL PROTECTED] > Internet: http://support.cp.net > > > -Original Message- > From: Tyler Longren [mailto:[EMAIL PROTECTED]] > Sent: 18 June 2002 17:08 > To: Perl List > Subject: Moving on...

Moving on....

2002-06-18 Thread Tyler Longren
setiathome1; setiathome2; exit; } else { usage; exit; } -End Code If a better explanation is desired, e-mail me directly. Thanks, -- Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com -- To unsubscribe, e-mail: [EMAIL PR

Re: NEW!!

2002-04-03 Thread Tyler Longren
www.perldoc.com is good. Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 03, 2002 2:47 PM Subject: NEW!! > Hi All, > > I am new to Perl ..

Re: Perldoc question

2002-03-12 Thread Tyler Longren
type this at your command line: echo $PATH That should display a few folders (/usr/local/bin, /usr/bin, etc...). your perldoc executable should be located in a folder listed in your $PATH. Good luck, Tyler - Original Message - From: "Joe Echavarria" <[EMAIL PROTECTED]> To: "Hanson, Ro

Archive::Tar

2002-03-07 Thread Tyler Longren
Hello, Can I archive directories using the Archive::Tar module? http://www.perldoc.com/perl5.6.1/lib/Archive/Tar.html Thank you, Tyler -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: making phone calls using a perl module

2002-02-28 Thread Tyler Longren
That dial-o-matic episode was on lastnight here in Iowa. :) Tyler - Original Message - From: "Nikola Janceski" <[EMAIL PROTECTED]> To: "'Brett W. McCoy'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, February 28, 2002 8:32 AM Subject: RE: making phone calls using a perl modul

Re: Syntax of Messages

2002-02-12 Thread Tyler Longren
you use $ for variables and @ for arrays. the Quantum::Entanglement module is a quantum programming module. It tries to replicate what it would be like to program on a quantum computer. Tyler - Original Message - From: "Anthony LaBerge" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent:

searching through httpd.conf

2001-12-26 Thread Tyler Longren
Hello list, I need to search for all virtual domains in an apache config file. Example: ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/blah.com/www ServerName www.blah.com ErrorLog /home/blah.com/logs/error_log CustomLog /home/blah.com/logs/access_log common

Re: today's date....

2001-12-05 Thread Tyler Longren
I'm not sure if there's a function to do that. But you could check the length of $DAY...if it's less than 2 you could just add a 0 infront of it. Good luck, Tyler Longren - Original Message - From: "Torres, Jose" <[EMAIL PROTECTED]> To: "&#x

getting individual lines

2001-12-03 Thread Tyler Longren
Hello, I have a HUGE document full of very simple SQL queries. Each query only takes up one line in the file. How could I get every individual line of SQL and execute it? I know how to query MySQL in perl, so that's fine...I just don't know how to get the individual lines to execute. Thanks e

Re: Problem using IF with AND

2001-10-29 Thread Tyler Longren
p;& instead of "and" in your if loop: > >if ($client ne $newclient && $method ne $newmethod) { > > // blah blah blah > >} > > > >I'm not even sure if that will work in perl. Who knows. > > > >Good luck, > >Tyler Longren >

Re: Problem using IF with AND

2001-10-29 Thread Tyler Longren
If I were you, I'd try using && instead of "and" in your if loop: if ($client ne $newclient && $method ne $newmethod) { // blah blah blah } I'm not even sure if that will work in perl. Who knows. Good luck, Tyler Longren On Mon, 29 Oct 200

searching for a few things

2001-09-18 Thread Tyler Longren
Hello, Can I do something like this: my @array; while () { chomp; push (@array, $_) if m/AAA/i; print "Reading logs...\r"; } but have it search for more than one string (AAA being that one string)? I'd like to search for AAA, BBB, and CCC and have all results be put into

Re: Perl script editor for NT/2000

2001-08-20 Thread Tyler Longren
Context. It's free. http://www.fixedsys.com/context/ It's all I use on my Windows boxen. -- Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Mon, 20 Aug 2001 11:20:35 -0400 TOM TURPIN <[EMAIL PROTECTED]> wrote: > Could someone sugges

Re: Clear

2001-08-20 Thread Tyler Longren
You use the "clear" command. system("clear"); I'm not sure what it is to clear the screen in dos. -- Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Mon, 20 Aug 2001 08:33:42 -0500 [EMAIL PROTECTED] wrote: > I am writing lines

timeout

2001-08-16 Thread Tyler Longren
ult = `whois $h`; } Is there any way to add, say a 30 second timeout to this? I've looked at the man pages for whois, and there doesn't appear to be any way to set a timeout in the whois command. Thanks, Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com -

Re: status messages as the program progresses

2001-08-15 Thread Tyler Longren
:) forgot to add the $i++. And that was just an example. On Wed, 15 Aug 2001 10:55:58 -0400 Bob Showalter <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: Tyler Longren [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, August 15, 2001 10:13 AM > >

status messages as the program progresses

2001-08-15 Thread Tyler Longren
"; } And that works, but if I run the script like this: ./script.pl > test.txt I get a BUNCH of "Processing" lines in test.txt. Is there any other way I can do this? Thanks, Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com -- To unsubscribe, e-

Re: Reading magnetic stripe data with perl

2001-08-14 Thread Tyler Longren
This will be of some interest to you: http://www.perldoc.com/perl5.6/pod/perlfaq8.html#How%20do%20I%20read%20and%20write%20the%20serial%20port%3f Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Tue, 14 Aug 2001 16:48:39 +0100 "Julian M Sawkins&quo

Re: number of elements in array is -1?

2001-08-10 Thread Tyler Longren
t; to > your second while loop, you're at the very end of the file. You need to > rewind. > > -Original Message- > From: Tyler Longren [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 10, 2001 9:29 AM > To: Brett W. McCoy > Cc: [EMAIL PROTECTED] > Su

Re: number of elements in array is -1?

2001-08-10 Thread Tyler Longren
"192.168.1.1"; my @scans; while () { push (@scans, $_) if m/$last_host/i; } close(LOGFILE); print "$scans[0]"; On Fri, 10 Aug 2001 10:28:23 -0400 (EDT) "Brett W. McCoy" <[EMAIL PROTECTED]> wrote: > On Fri, 10 Aug 2001, Tyler Longren wrote:

Re: number of elements in array is -1?

2001-08-10 Thread Tyler Longren
) > > Are you checking to make sure LOGFILE opened correctly? > > -Original Message- > From: Tyler Longren [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 10, 2001 9:19 AM > To: Perl-Beginners > Subject: number of elements in array is -1? > > > Hello e

number of elements in array is -1?

2001-08-10 Thread Tyler Longren
ies in LOGFILE that have an IP of 192.168.1.1. Thanks, Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

result of regexps into a string

2001-08-09 Thread Tyler Longren
correct or not. Can anybody offer any help? Thanks, Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: colored text

2001-08-09 Thread Tyler Longren
That's pretty cool. Works great. Thank you! Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Thu, 9 Aug 2001 08:33:58 -0700 (PDT) Mark Ross <[EMAIL PROTECTED]> wrote: > > I was wondering if there was anyway to print colored > > text

colored text

2001-08-09 Thread Tyler Longren
Hello everyone, I was wondering if there was anyway to print colored text at the command line. I'm using linux. Something kind of like how the directories and executables are colored when you do an 'ls' in linux... Thanks, Tyler Longren Captain Jack Communications [

string into an array

2001-08-08 Thread Tyler Longren
m the grep and place them into an array? I want to do it result by result. So the first result could be $array[0], the second could be $array[1], and so on... Know what I mean? If not, don't pay any attention. Thanks everyone! Tyler Longren Captain Jack Communications [EMAIL PROTECTED]

chompping periods

2001-07-25 Thread Tyler Longren
Is there a way to chomp a period? Example: this is a test. to this is a test I just need to remove the period from the end of a string. Thanks, Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

output of a command to a file

2001-07-24 Thread Tyler Longren
ommand\n"; The above code doesn't work though. There's nothing in the $command variable. The only thing that gets printed to $outfile is $h. Thanks everyone Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: system interaction

2001-07-23 Thread Tyler Longren
Why can't you do that with the regular command line? change to a directory with "cd dir_name", change to a drive by typing the drive name "C:", "A:" Copy files with the "copy" command. Tyler Longren Captain Jack Communications [EMAIL PROTECTED]

Re: looking at rows in text files

2001-07-18 Thread Tyler Longren
if /(.com\S)/; } foreach my $h(@list) { print "$h"; } They're more or less the same thing except the regexps are different Tyler - Original Message - From: "Jos I. Boumans" &l

Re: looking at rows in text files

2001-07-18 Thread Tyler Longren
t print anything to the screen. Really, thank you! - Original Message - From: "Jos I. Boumans" <[EMAIL PROTECTED]> To: "Tyler Longren" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, July 18, 2001 1:29 PM Subject: Re: looking at row

looking at rows in text files

2001-07-18 Thread Tyler Longren
Hello everyone, I have a file that contains a few domain names, and their dns servers (kind of like a zonefile). Here's the format: my.comdns1.blah.com me.comdns1.blah.com we.comdns1.blah.com you.com dns1.blah.com How can I get ONLY the domain's out of that file, and print each do

Re: if something equals nothing

2001-07-17 Thread Tyler Longren
no...it was supposed to be $options{a} and $options{i}... I accidentally put a twice in the email - Original Message - From: "Brett W. McCoy" <[EMAIL PROTECTED]> To: "Tyler Longren" <[EMAIL PROTECTED]> Cc: "Mooney Christophe-CMOONEY1" <

Re: if something equals nothing

2001-07-17 Thread Tyler Longren
Sorry for not providing enough of the code. Here's more that will help. use strict; use Getopt::Std; getopts("d:a:i:n:", \my %options); if (!defined $options{a} && !defined $options{i}) { if ($options{a} eq "" && $options{i} eq "") { print " Usage: log.pl [-d] -a -i [n]\n

Re: if something equals nothing

2001-07-17 Thread Tyler Longren
would be to say > > if (!$something) { ... blah blah ... } > > Since $something will return false in a boolean context (if it is empty) > > -Original Message- > From: Tyler Longren [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 17, 2001 12:56 PM > To: Perl Begi

if something equals nothing

2001-07-17 Thread Tyler Longren
How do I do: if ($something == "") { # do something } in perl? Thanks, Tyler -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: timer/display

2001-07-10 Thread Tyler Longren
this for loop works: for(my $i=0; $i <= 1; $i++) { print "$windmill[$i % 4]\r"; usleep(5); } I changed the $_ to $i... Tyler - Original Message - From: "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> To: "Tyler Longre

Re: timer/display

2001-07-10 Thread Tyler Longren
: Re: timer/display > Try > > print "$windmill[$_ % 4]\r" > > instead. > > > On 10 Jul 2001 09:04:18 -0500, Tyler Longren wrote: > > I've been playing with this spinning wheel thing. I've read through this > > thread: > > <http://archive.d

Re: timer/display

2001-07-10 Thread Tyler Longren
I've been playing with this spinning wheel thing. I've read through this thread: I don't know why this doesn't work: #!/usr/bin/perl -w use strict; $| = 1; use Time::HiRes qw(usleep); my @windmill=("\\", "|", "/", "-"); for(my $

Re: command line flags

2001-07-09 Thread Tyler Longren
Example: use Getopt::Std; getopts("dwmy", \%options); # If no command line option is specified print the usage. if (!defined $options{d} && !defined $options{w} && !defined $options{m} && !de$ print " Usage: log.pl < -d -w -m -y > -d : generate log for last 24 hours -w

Re: modules & path to perl

2001-07-05 Thread Tyler Longren
do a 'which perl' at the command line to get the location of perl. Not sure about the modules. To get the version of perl, do 'perl --version' at the command line. Tyler - Original Message - From: "David Gilden" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 05, 2001 1

Re: Editor

2001-07-03 Thread Tyler Longren
Context is my choice: http://www.fixedsys.com/context/ Tyler - Original Message - From: "Bill Pierson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 03, 2001 2:33 PM Subject: Editor Hello again, all. May I get some suggestions for any Windows-based PERL development t

Re: arrays

2001-06-28 Thread Tyler Longren
P). Thanks! Tyler - Original Message - From: "Brett W. McCoy" <[EMAIL PROTECTED]> To: "Tyler Longren" <[EMAIL PROTECTED]> Cc: "Perl Beginners" <[EMAIL PROTECTED]> Sent: Thursday, June 28, 2001 9:18 AM Subject: Re: arrays > On Thu, 28 Ju

Re: arrays

2001-06-28 Thread Tyler Longren
Thank you everyone. All of you have been a great help. That is exactly what I need. I'll figure out how to get just the servernames from the VirtualHosts myself (I'll try anyway) ;-) Thanks! Tyler - Original Message - From: "Brett W. McCoy" <[EMAIL PROTECT

arrays

2001-06-28 Thread Tyler Longren
Hello everyone, I'm just starting perl. I want to search through httpd.conf and get the ServerName from each virtual host. Ex: DocumentRoot /home2/ploo.net/www ServerName www.ploo.net CustomLog /home2/ploo.net/logs/access_log ErrorLog /home2/ploo.net/logs/error_l

Re: getopt:std questions

2001-06-27 Thread Tyler Longren
Ahh..that worked wonderfully. Thank you very much! Tyler - Original Message - From: "Ela Jarecka" <[EMAIL PROTECTED]> To: "'Tyler Longren'" <[EMAIL PROTECTED]> Cc: "Beginners list (E-Mail)" <[EMAIL PROTECTED]> Sent: Wednesday, J

getopt:std questions

2001-06-27 Thread Tyler Longren
doesn't work...it doesn't print anything. Can anybody shed some light on this for me? Thanks, Tyler Longren