RE: How to install modules without ppm3 ?

2005-08-01 Thread Tim Johnson
I'm assuming you're using Windows? -Original Message- From: Clement [mailto:[EMAIL PROTECTED] Sent: Monday, August 01, 2005 1:30 AM To: beginners@perl.org Subject: How to install modules without ppm3 ? Hello , I am trying to install the module Image::MagicK GD, however, I can't get

RE: reference trouble

2005-08-01 Thread Tim Johnson
I think you need to explain a little better what you're trying to do here, and what you EXPECT to happen. For one thing, why are you using $u as your array index? Are you sure you don't want a hash? -Original Message- From: Tom Allison [mailto:[EMAIL PROTECTED] Sent: Monday, August

RE: reference trouble

2005-08-01 Thread Tim Johnson
. -Original Message- From: Tom Allison [mailto:[EMAIL PROTECTED] Sent: Monday, August 01, 2005 7:03 PM To: Tim Johnson Cc: beginners perl Subject: Re: reference trouble [Tim Johnson] snip I've changed it out to a hash and create a seperate array of keys that are sorted: my @keys

RE: Perl framework for windows-prob in makefile

2005-07-31 Thread Tim Johnson
PROTECTED] Sent: Sunday, July 31, 2005 5:00 AM To: Dhanashri Bhate Cc: Perl-Beginners (E-mail); Perl-Tips (E-mail) Subject: Re: Perl framework for windows-prob in makefile [Tim Johnson] snip On Sat, 30 Jul 2005 11:06:32 +0530, Dhanashri Bhate wrote: Hi! I'm trying to get Perl framework

RE: Want code to display date in different timezone

2005-07-29 Thread Tim Johnson
The Time::Local module also works well. -Original Message- From: Tom Allison [mailto:[EMAIL PROTECTED] Sent: Friday, July 29, 2005 4:03 PM To: Anil Kumar, Malyala Cc: beginners@perl.org Subject: Re: Want code to display date in different timezone [Tim Johnson] snip Another option

RE: MIME::Lite message text

2005-07-25 Thread Tim Johnson
I'm trying to send a multipart mail message using MIME::Lite. [Tim Johnson] snip I can do it by making 2 attachments, one a text file, the other the tarball, but what I really want to do is print the text inline, not as an attachment. [Tim Johnson] snip -- To unsubscribe, e-mail: [EMAIL

RE: MIME::Lite message text

2005-07-25 Thread Tim Johnson
.= $ref-{COLUMN}; } Then you can use $data in your initialization statement. -Original Message- From: Charles Farinella [mailto:[EMAIL PROTECTED] Sent: Monday, July 25, 2005 2:10 PM To: Perl Beginners Subject: RE: MIME::Lite message text On Mon, 2005-07-25 at 16:46, Tim

RE: Pass a value to Perl script

2005-07-13 Thread Tim Johnson
If it is a console mode program then you can still use backticks in Windows. The only thing to watch out for is when a program prints to STDERR, which a few of the standard Windows command-line utilities will do in some circumstances. That, I believe, won't be caught by backticks (someone

RE: modifying a file

2005-07-06 Thread Tim Johnson
. -Original Message- From: Eliyah Kilada [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 05, 2005 10:42 PM To: beginners@perl.org Subject: modifying a file [Tim Johnson] snip modify FIN?! i.e., I need to make modifications in the same file I read from. -- To unsubscribe, e-mail: [EMAIL

RE: threads

2005-07-06 Thread Tim Johnson
Yes. -Original Message- From: Patricio Bruna V [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 06, 2005 12:01 PM To: Perl Subject: threads does perl support threads? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: ???UNSURE??? RE: need help with regular expression

2005-06-14 Thread Tim Johnson
: Tuesday, June 14, 2005 4:30 PM To: Wagner, David --- Senior Programmer Analyst --- WGO; Perl Beginner Subject: Re: ???UNSURE??? RE: need help with regular expression [Tim Johnson] snip Originally I had thought to assign L, I, V, F, Y, and A to another variable, called $hydrophobe or some

RE: GetOpt::Long

2005-04-20 Thread Tim Johnson
How about something like this? It doesn't make it like GetOpt::Long, but it does handle what you want. Or you could just require that people pass an array to your subroutine and save yourself a little work. If there is only one recipient, then it's a one-element array.

RE: regex for l33t speak

2005-03-23 Thread Tim Johnson
First off, perldoc perlre is a good place to start. What do you have so far? Does something like /\b1337\b/ work? Or am I taking you too literally? -Original Message- From: Andrew Gaffney [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 23, 2005 5:52 PM To: beginners@perl.org

RE: Reference name

2005-03-14 Thread Tim Johnson
14, 2005 5:21 PM To: beginners@perl.org Subject: Reference name [Tim Johnson] snip my %hash = ( abcd = { a1 = 1, a2 = 2, a3 = 3 } ); How can I access the name (abcd) of the passed reference inside of the subroutine (not just

RE: Execute application with a space in it's path

2005-03-09 Thread Tim Johnson
\ C:\\PDFs\\test.pdf); -Original Message- From: Daniel Kasak [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 3:32 PM To: beginners@perl.org Subject: Execute application with a space in it's path [Tim Johnson] snip I can get to the 'Adobe' folder with the commands ( from

RE: call a perl script within another perl script

2005-03-03 Thread Tim Johnson
I guess it partly depends on what you are trying to accomplish. Why are you calling a second script? -Original Message- From: Nishi Prafull [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 3:47 PM To: beginners@perl.org Subject: call a perl script within another perl script

RE: Detect platform

2005-02-16 Thread Tim Johnson
Check out the $^O variable. -Original Message- From: Daniel Kasak [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 3:00 PM To: beginners@perl.org Subject: Detect platform How do I detect what platform I'm running from inside a Perl script? -- To unsubscribe, e-mail:

RE: Is there a regexp that will match two or more expressions???

2005-02-03 Thread Tim Johnson
You mean like this? I'm not 100% sure what you're asking. ## use strict; use warnings; open(INFILE,myfile.txt) || die Couldn't open 'myfile.txt' for reading!\n; my @LinesIWantToKeep; while(INFILE){ if($_ =~ /Jan 12/){ push

RE: Is there a regexp that will match two or more expressions???

2005-02-03 Thread Tim Johnson
Oh, ok. So you mean like... if($_ =~ /\bJan\b.*\bDec\b/){ print $_; } ? -Original Message- From: Harold Castro [mailto:[EMAIL PROTECTED] Sent: Thursday, February 03, 2005 5:02 PM To: Tim Johnson; beginners@perl.org Subject: RE: Is there a regexp that will match two or more

RE: Write stdout to a file as well as stdout

2005-01-11 Thread Tim Johnson
stdout to a file as well as stdout I have a script that does all kinds stuff. When its running it outputs all kinds of useful information to the screen and exits. What I want to do is have this also sent to a file. [Tim Johnson] snip -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: functions that returns two arrays

2005-01-03 Thread Tim Johnson
To: beginners@perl.org Subject: functions that returns two arrays Hi, I'm trying to write a function that could return two arrays. [Tim Johnson] snip -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

RE: Is there a time module to help with this...

2004-12-17 Thread Tim Johnson
What OS are we talking about? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 12:42 PM To: [EMAIL PROTECTED] Subject: RE: Is there a time module to help with this... That's a good idea. However I want it to run constantly, like a

RE: Is there a time module to help with this...

2004-12-17 Thread Tim Johnson
Ah. I see. You should respond to the list though. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 1:33 PM To: Tim Johnson Subject: RE: Is there a time module to help with this... HP-UX. But I would like to code it in such a manner

RE: how to assign an external command aoutput to an array

2004-10-16 Thread Tim Johnson
Or even my @values = split(/ /,qx'..'); should work. I can't test that where I am, but unless there is some weird caveat with the qx operator (which I don't usually use), then it should work. -Original Message- From: Mauro [mailto:[EMAIL PROTECTED] Sent: Friday,

RE: output to one changing line

2004-09-15 Thread Tim Johnson
[Tim Johnson] snip perl -e '$|=1; print \rLine $_ and sleep 1 for 1..3; print \n' [Tim Johnson] snip -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

RE: A simple way? A Perl way?

2004-09-01 Thread Tim Johnson
Just for the sake of showing another way to do it... my $input = 2-8,9,11,18-21; $input =~ s/-/\.\./g; print join(',',eval($input)); or if you don't want to print out the list but iterate through it... my $input

RE: get last record in a file

2004-08-25 Thread Tim Johnson
Another way to go: my $lastline; open(FILE,test789.pl) || die Couldn't open \test789.pl\ for reading!\n; while(FILE){ $lastline = $_; } print \$lastline\\n is the last line.\n; -Original Message- From: balaji venkat [mailto:[EMAIL PROTECTED] Sent: Wed

RE: Need help to sort data

2004-08-23 Thread Tim Johnson
For starters, ALWAYS 'use strict;' and 'use warnings;' at the beginning of your scripts. It's a little annoying at first, but it saves you from some very time-consuming mistakes down the line. Okay, here is one way to do the kind of thing I think you are asking to do. Keep in mind that I took

RE: COMPLEX ARRAY STRUCTURE

2004-08-09 Thread Tim Johnson
Are you sure you want that top level to be an anonymous array instead of a hash? This would make more sense (see below for how to access the values). Note the {} brackets instead of the [] brackets. # my $a = {'cn' = ['Barbara Jensen',

RE: Windows Perl Environment

2004-07-17 Thread Tim Johnson
If you're ready to pay money for it, then there's Visual Perl from ActiveState (VS plug-in, works great), Komodo from ActiveState, PerlBuilder from SolutionSoft that have built-in debuggers. The Visual Debugger that comes with the Perl Dev Kit from ActiveState is also pretty good.

RE: 1 Windows XP + 1 Office XP = $80 d dhhytzy vs dxq

2004-07-17 Thread Tim Johnson
I guess his name says it all... -Original Message- From: Carl Colon [mailto:[EMAIL PROTECTED] Sent: Wed 7/21/2004 1:16 PM To: [EMAIL PROTECTED] Cc: Subject: 1 Windows XP + 1 Office XP = $80 d dhhytzy vs dxq

RE: !$state

2004-07-16 Thread Tim Johnson
so that you have the benefit of all of the documentation converted to HTML in a much more intuitive format. -Original Message- From: Harald Richard Ashburner [mailto:[EMAIL PROTECTED] Sent: Thu 7/15/2004 10:21 PM To: Tim Johnson Cc: David

RE: !$state

2004-07-16 Thread Tim Johnson
Thank you, yes. That is an important distinction. -Original Message- From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] Sent: Fri 7/16/2004 7:17 AM To: [EMAIL PROTECTED] Cc: Subject: Re: !$state Tim == Tim

RE: !$state

2004-07-15 Thread Tim Johnson
$state evaluates as true (I think that's what you're asking). $state = {}; if($state){ print \$state is true: $state\n; }else{ print \$state is false; } $state is true because it's not empty. It's a reference

RE: creating a table in Microsoft Word

2004-07-13 Thread Tim Johnson
in Microsoft Word [Tim Johnson] snip- Take a look at Win32::OLE. It will allow you to start an (invisible) instance of Word and control it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http

Launching scripts via command prompt [WAS RE: Could you please help with a PERL/TK question.]

2004-07-12 Thread Tim Johnson
Just one quick note: I've seen a lot of people say that this is the way to run a script from the command-line, but any script that you can run by double-clicking should also be able to be run by just typing in the name of the script at the command-line (provided you are in the same directory

RE: how do you run the debuger for perl/TK in Windows-2000

2004-07-12 Thread Tim Johnson
Please don't send the same question to the list twice in a row. The truth is there aren't many people answering questions on a Sunday night (US), but re-sending the question doesn't increase your chances of having your question answered, but some people really get irked by the extra traffic on

RE: Clearing up Google history

2004-07-12 Thread Tim Johnson
This isn't a Perl question. Please post it elsewhere. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 12, 2004 1:37 PM To: [EMAIL PROTECTED] Subject: Clearing up Google history How do I clear up my google history (IE history can be cleared via

RE: Regex for numbers and text

2004-07-12 Thread Tim Johnson
Another good module for helping you understand what a complicated regex MEANS (which will help you know how to fix it) is YAPE::Regex::Explain. It also helps with some issues where a regex may be working, but not for the reason you think. -Original Message- From: Jerry

RE: Backticks alternative?

2004-07-06 Thread Tim Johnson
My bad. I changed it to try to make it sound more descriptive, but didn't test. Thanks for pointing it out. -Original Message- From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] Sent: Tue 7/6/2004 1:00 AM To: [EMAIL PROTECTED] Cc:

RE: Backticks alternative?

2004-07-05 Thread Tim Johnson
If you want the exact same function as the backticks, why not just make a small subroutine? # $exec = ls -l; $src = syscall($exec); sub syscall{ return `$_[0]`; } # should work. -Original Message- From: gohaku [mailto:[EMAIL

RE: Win32::NetAdmin::LocalGroupGetMembers

2004-06-28 Thread Tim Johnson
That's because the SID is stored in binary, and when you try to print it, it tries to convert that binary value into a series of characters, one of which is the beep sound (I know it doesn't make any sense, but it's true). Subject: Win32::NetAdmin::LocalGroupGetMembers Date: Fri, 25 Jun 2004

RE: [Doubt]: Retrieve System Info like Which OS and type

2004-06-22 Thread Tim Johnson
Check out the Win32::TieRegistry module. It's pretty easy to get that info from the Registry. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 11:32 AM To: [EMAIL PROTECTED] Subject: [Doubt]: Retrieve System Info like Which OS and type

RE: script

2004-06-21 Thread Tim Johnson
What have you tried? Are you stumped, are you trying to learn, or are you just trying to get people to write scripts for you? When you ask a question, you should include what you have done so that people can give you answers that match the level of experience you have and so that they know

RE: split

2004-06-21 Thread Tim Johnson
That is one way to do it, but maybe you should tell him what it is that the regex does. I remember from my newbie days that it wasn't too useful when people just threw regexes at me without explaining them because they look so daunting before you are used to them. -Original

Answering Questions [WAS:RE: split]

2004-06-21 Thread Tim Johnson
Message- From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] Sent: Mon 6/21/2004 6:18 AM To: [EMAIL PROTECTED] Cc: Subject: Re: split Tim Johnson wrote: Chetak Sasalu wrote: $var =~ m/Owner: (\w{5})\s*: rwx \(all\)/; $y = $1; That is one way to do it, but maybe you should tell him

RE: Adding Arrays as Hash Keys

2004-06-20 Thread Tim Johnson
I'm a little hesitant to offer an answer because I'm not sure what you mean, but I'll give it a shot so that you have a chance to clarify if I'm way off. It's possible that what you want is a hash of arrays, where each hash key points to a different array. If so, then what you would want

RE: Regexp

2004-06-19 Thread Tim Johnson
This sounds like a homework project. We don't generally do people's homework for them. If I'm wrong, I apologize. Maybe you can tell us what you've tried so far. Have you read through 'perldoc perlre'? I would recommend the module YAPE::Regex::Explain if you want some help figuring out what

RE: Regexp

2004-06-19 Thread Tim Johnson
What about: $string =~ s/s\b//g; -Original Message- From: Mandar Rahurkar [mailto:[EMAIL PROTECTED] Sent: Saturday, June 19, 2004 8:06 PM To: Tim Johnson Cc: [EMAIL PROTECTED] Subject: RE: Regexp Hi, I am too old to have homeworks on perl :) I tried for the first case: s/\ws\b/$1

RE: Regexp

2004-06-19 Thread Tim Johnson
And for #2, how about: s/\b\w{1,2}\b//g; -Original Message- From: Mandar Rahurkar [mailto:[EMAIL PROTECTED] Sent: Saturday, June 19, 2004 5:48 PM Cc: [EMAIL PROTECTED] Subject: Regexp snip 2. removing all one and two lettered words e.g., a,an -- To unsubscribe, e-mail: [EMAIL

RE: array

2004-06-18 Thread Tim Johnson
-Original Message- From: Stefan Weckx [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 1:38 AM To: [EMAIL PROTECTED] Subject: array hi list, 2 questions about arrays: - I want to take 2 elements a time from an array within a foreach control structure, which should be something

RE: Subtracting Zero Dates

2004-06-18 Thread Tim Johnson
One way: Convert both dates to Perl time() format, then subtract. -Original Message- From: Werner Otto [mailto:[EMAIL PROTECTED] Sent: Fri 6/18/2004 3:28 AM To: [EMAIL PROTECTED] Cc: Subject: Subtracting Zero Dates

RE: script

2004-06-18 Thread Tim Johnson
Check out the Archive::Zip and Archive::tar modules. -Original Message- From: Vema Venkata [mailto:[EMAIL PROTECTED] Sent: Fri 6/18/2004 2:25 AM To: [EMAIL PROTECTED] Cc: Subject: script Hi Group,

RE: printing array elements in columns

2004-06-18 Thread Tim Johnson
I can't test this out where I am, but here's one thought... ## my $columns = 5; my $i = 0; while($i ($#X + $columns)){ for($i..$i+$columns){ print $X[$_]; for(1..(20 - length($X[$_])){ print ; } } print \n; }

RE: Subtracting Zero Dates

2004-06-18 Thread Tim Johnson
How about: if($time1 $time2){ $difference = $time1 - $time2; }else{ die Invalid date!\n; } -Original Message- From: Werner Otto [mailto:[EMAIL PROTECTED] Sent: Fri 6/18/2004 5:34 AM To: Tim Johnson; [EMAIL PROTECTED] Cc

RE: Date and time calculation

2004-06-16 Thread Tim Johnson
Time::Local can come in very handy when you need to convert text dates to Perl time as well. -Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Wed 6/16/2004 7:27 AM To: Werner Otto; [EMAIL PROTECTED] Cc:

RE: Microsoft Word and Perl

2004-06-14 Thread Tim Johnson
Or you can use the in() function from Win32::OLE, which will enumerate all objects within a container use Win32::OLE qw(in); foreach my $obj_Story(in($newdoc-StoryRanges)){ -Original Message- From: Ichim, Adrian N. [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 12:12 AM To:

RE: Microsoft Word and Perl

2004-06-13 Thread Tim Johnson
Try changing Fields-{Update} to Fields-{update} or Fields-update() -Original Message- From: Ilaiy [mailto:[EMAIL PROTECTED] Sent: Sat 6/12/2004 2:39 PM To: [EMAIL PROTECTED] Cc: Subject: Microsoft Word and Perl

RE: search and move 'expired files'

2004-06-11 Thread Tim Johnson
You can use the -d file test to check if the file is a directory before moving it. unless(-d $whatever_file){ do whatever... -Original Message- From: Shu Hung () [mailto:[EMAIL PROTECTED] Sent: Fri 6/11/2004 3:50 AM To: Perl Beginner Mail Group Cc: Subject: search and move

RE: procfarm equivalent

2004-06-10 Thread Tim Johnson
-Original Message- From: drieux [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 11:15 PM To: Perl Beginners Mailing List Subject: Re: procfarm equivalent On Jun 9, 2004, at 8:25 PM, Ron Willmert wrote: Is there a Unix equivalent Win32-ProcFarm? I really like having the

RE: Concatenating line into array problem

2004-06-10 Thread Tim Johnson
This might be closer to what you want. Just push the line onto the array every time you come to the '' character. You'll get one empty line at the beginning, that's why I put the shift line in. while () { if (/^/) { push (@crseq, $line);

RE: Searching a string

2004-06-09 Thread Tim Johnson
perldoc perlre Look at the /s switch for regexes. -Original Message- From: sudhindra k s [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 12:23 AM To: [EMAIL PROTECTED] Subject: Searching a string   Hi I have a string (not a file ) which looks something like this :

RE: system() command

2004-06-08 Thread Tim Johnson
Before going any further, you might want to tell us what operating system you are using. As far as I know, the operator can be used to feed a program certain input as if it came from STDIN, but I've never used it because it always sounded a bit kludgy to me. -Original Message- From:

RE: DBI

2004-06-07 Thread Tim Johnson
Should be install DBI, as in: PPM - Programmer's Package Manager version 3.1. Copyright (c) 2001 ActiveState SRL. All Rights Reserved. Entering interactive shell. Using Term::ReadLine::Stub as readline library. Profile tracking is not enabled. If you save and restore profiles manually, your

RE: how to use perl in windows

2004-06-06 Thread Tim Johnson
My $0.02: Go to www.activestate.com and download ActivePerl. Not only is it the de facto Win32 Perl distribution, but you will have access to PPM, which lets you install most commonly-used modules at the touch of a button (especially convenient because Windows doesn't come with a

RE: how to retreive data from internet.

2004-06-06 Thread Tim Johnson
How far have you gotten? Do you know any Perl yet, or are you just starting? Try checking out the documentation for Net::FTP. -Original Message- From: aditi gupta [mailto:[EMAIL PROTECTED] Sent: Sunday, June 06, 2004 9:42 PM To: [EMAIL PROTECTED] Subject: how to retreive data from

RE: references and freeing memory

2004-06-04 Thread Tim Johnson
Yes and no. From what I understand (and someone please correct me if I'm wrong), the memory is freed in the sense that it is returned to Perl, but it is not returned to your system. Once there are no references to a variable, the memory can be overwritten by future variables used in your

RE: printing contents between lines

2004-06-03 Thread Tim Johnson
Here's another way to do it, and the nice thing about this way is that you can reuse the sub later. This subroutine will print every line starting after the $start phrase and until it finds the $end phrase. ### PrintSection(myfile.txt,tools:,not a

RE: appending to a file

2004-05-27 Thread Tim Johnson
To append to a file, you must open() the file, like so: open(OUTFILE,myfile.txt) || die Could not open myfile.txt for appending!\n; Then when you want to write to the file, use print(), like so: print OUTFILE The text I want to add to the end of my file\n; -Original

RE: recording the position of m// searches

2004-05-13 Thread Tim Johnson
Two thoughts here: 1) The $. Variable has the line number of the file you are iterating through, so you could use that combined with pos() 2) You could also try something like this: while(INFILE){ if($_ =~ /.{20}$pattern.{20}/){ push(@found,$1); } } -Original Message-

RE: How to find files in subdirectory

2004-05-12 Thread Tim Johnson
Check the documentation for the File::Find module. It comes standard with most Perl distributions. -Original Message- From: LK Tee [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 6:52 PM To: '[EMAIL PROTECTED]' Subject: How to find files in subdirectory Hi, I'm perls beginner

RE: how do you install perl on windows 2000

2004-05-06 Thread Tim Johnson
To: Tim Johnson Cc: Subject: RE: how do you install perl on windows 2000 in my file i have #!/usr/local/bin/perl -w so why do i need to type at the command prompt: perl filename.pl? what does this mean

RE: how to install perl

2004-05-06 Thread Tim Johnson
If you have to type perl command.pl at the command-line, then you probably don't have your Perl install path in your system's PATH variable. Try this: 1. Right-click on My Computer and select Properties. 2. On the Advanced Tab, click the Environment Variables button. 3. In the system variables,

OT: RE: Security Question

2004-04-26 Thread Tim Johnson
I think this is off-topic for this list. It's more of a cryptography question than a Perl question (and it's not even really a question). -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED] Sent: Monday, April 26, 2004 3:44 PM To: [EMAIL PROTECTED] Subject: Re: Security

RE: Who is running my program?

2004-04-11 Thread Tim Johnson
If you are on a Win32 system, you can check the $ENV{USERNAME} value. -Original Message- From: Chance Ervin [mailto:[EMAIL PROTECTED] Sent: Saturday, April 10, 2004 5:07 PM To: beginners Subject: Who is running my program? I am writing a perl program to access client information for

RE: Getting into programming with perl.

2004-04-08 Thread Tim Johnson
There have been many threads on this discussion, so if you want a good list, try doing a search on google groups. -Original Message- From: Flemming Greve Skovengaard [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 9:06 AM To: Leke Lapinkangas; [EMAIL PROTECTED] Subject: Re:

RE: illegal octal digit '8'?

2004-04-02 Thread Tim Johnson
Just another suggestion on how you might accomplish the same thing: ## my @months = qw(XXX JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC); return $months[$tmp] ## -Original Message- From: Charlotte Hee

RE: directory operations

2004-04-01 Thread Tim Johnson
If you did want to filter based on a regular expression, you can always do it the long way: opendir(DIR,.) || die; my @file_list = readdir(DIR); foreach my $file(@file_list){ if(-f $file ($file =~ /Place Regex Here/)){ #do something... } } You get the general idea. Also,

RE: What is happening here

2004-03-29 Thread Tim Johnson
Apparently (++$count) evaluates to 0, but I can't figure out why. So the second expression is evaluated first. From there it's pretty self-explanatory. (++$count) will always evaluate to TRUE, since it will only get higher, and the first expression is evaluated. Maybe someone can enlighten

RE: importing to excel file..

2004-03-18 Thread Tim Johnson
That depends. You can definitely make an excel file using Perl (see the docs for Win32::OLE for a small example), or for the quick and dirty route you can either: A) Create a comma-separated-values file Or B) Create a tab-separated-values file And then you can just open it in Excel later.

RE: CMD Install Doesn't Work

2004-03-11 Thread Tim Johnson
You need to invoke PPM first. C:\ PPM PPM install Win32-My-Module ... -Original Message- From: KENNETH JANUSZ [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 9:21 AM To: PERL Beginners Subject: CMD Install Doesn't Work I tried Start - Run - CMD This is what I got.

RE: Disable Screensaver with Keyboard input

2004-03-05 Thread Tim Johnson
Check out the Win32::SetupSup module. It will allow you to send keystrokes to the console. -Original Message- From: Stefan Lubitz [mailto:[EMAIL PROTECTED] Sent: Friday, March 05, 2004 4:16 AM To: [EMAIL PROTECTED] Subject: Disable Screensaver with Keyboard input Hi there, snip

Threads in Perl

2004-03-02 Thread Tim Johnson
Can anyone give me a quick hint as to where to find documentation on how to use threads w/Perl? I understand that it's one of the main differences between 5.8.x and 5.6.x, but I'm having trouble finding docs on it. I get back way too many irrelevant results when I google, etc.

RE: WIN2K Active Directory qtn. execute system command with login script.

2004-03-01 Thread Tim Johnson
Make sure you import the in function from the Win32::OLE module, then you can do something like this: ### use strict; use warnings; use Win32::OLE qw(in); my $obj = Win32::OLE-GetObject(LDAP://server/OU=MyOU,DC=company,DC=com ) || die; $obj-{Filter} = [User];

RE: regular expression that doesn't match any string

2004-02-25 Thread Tim Johnson
I believe the '.' character does not have the same special meaning within a character class, and that's why it isn't matching what you think it does. You should check out the YAPE::Regex::Explain module. It's great for debugging regular expressions. -Original Message-

RE: 1 liner question

2004-02-25 Thread Tim Johnson
That's not really a one-liner, that's just a script with the whitespace taken out. Just my opinion, but I thought the whole point to one-liners was to try to reduce a complex operation to its most compact form so that you could just type it at the command-line when you needed it quickly. If you

RE: Searching through a directory.

2004-02-13 Thread Tim Johnson
I know this doesn't actually answer your initial question, but you should try using the File::Find module. It's one of the standard modules that comes with just about any distribution. 'perldoc File::Find' should give you more information. -Original Message- From: John Lin

RE: Perl Executable

2004-02-10 Thread Tim Johnson
Why not just do it from your shell? 'path/to/perl scriptname' works quite nicely, so why not just make an alias for the path to perl? -Original Message- From: Jeffery Malloch [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 11:08 AM To: '[EMAIL PROTECTED]' Subject: Perl

RE: Reg. string matching using reg-exp

2004-02-06 Thread Tim Johnson
It looks like there is no '\r\n' at the end of $line. -Original Message- From: Balaji Thoguluva [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 11:45 AM To: [EMAIL PROTECTED] Subject: Reg. string matching using reg-exp #!/usr/bin/perl -w my $line= 'INVITE sip:[EMAIL

RE: Reg. string matching using reg-exp

2004-02-06 Thread Tim Johnson
: Balaji Thoguluva [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 12:07 PM To: Tim Johnson Subject: RE: Reg. string matching using reg-exp Thanks Tim Johnson. I removed the /r/n from the reg-ex and it works. I have another question. How to assign a multiline string or string having

RE: Using compression on Win32 systems

2004-02-05 Thread Tim Johnson
Try looking for Archive::Zip -Original Message- From: Ned Cunningham [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 8:35 AM To: Paul Kraus; [EMAIL PROTECTED] Subject: RE: Using compression on Win32 systems Yes, I have looked and googled and searched aspn. Have not been

RE: * CSV to HTML * zero reads as empty space

2004-02-05 Thread Tim Johnson
We might need a little code if we're going to help. As far as I know there are no CSV-HTML gotchas that would do this, so it's probably your algorithm. Are you doing something like this? if($my_var){ print $my_var; } that would print nothing if the value was a zero, because zero

RE: reference ?

2004-02-04 Thread Tim Johnson
The third parameter is an anonymous array. What this means is that we are referring to an array by reference that we didn't name first. If you printed it out, Perl would display it as something like ARRAY(something). Just as an example, you could do something like this:

RE: Program to reformat Perl code?

2004-02-03 Thread Tim Johnson
Look for PerlTidy. -Original Message- From: John McKown [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 03, 2004 6:28 PM To: Perl Beginners Mailing List Subject: Program to reformat Perl code? I have some fairly ugly Perl code which I generated sort of ad-hoc from a file

RE: Perl Style

2004-01-31 Thread Tim Johnson
I would guess either that or if() { #code } else { #more code } which I have seen, usually by people who primarily code in C. -Original Message- From: Robert [mailto:[EMAIL PROTECTED] Sent: Sat 1/31/2004 2:24 PM To: [EMAIL PROTECTED]

RE: binary perl

2004-01-30 Thread Tim Johnson
perldoc perlcc -Original Message- From: Dan Brow [mailto:[EMAIL PROTECTED] Sent: Friday, January 30, 2004 11:03 AM To: Perl Beginners Subject: Re: binary perl What's the perl compiler called? On Sat, 2004-01-24 at 18:13, Dan Anderson wrote: On Fri, 2004-01-23 at 20:44, Dan Brow

RE: Two-liner to one-liner

2004-01-28 Thread Tim Johnson
Just a small correction: In scalar context it returns 1 because there is 1 element in the list. If there were more parentheses it might return a higher number. -Original Message- From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 28, 2004 6:13 PM To: 'Jan

RE: LOST - Win32::Process

2004-01-28 Thread Tim Johnson
I haven't used it much myself, but have you tried Win32::Process::KillProcess? I just got that from perldoc Win32::Process. -Original Message- From: RL [mailto:[EMAIL PROTECTED] Sent: Wed 1/28/2004 12:29 PM To: [EMAIL PROTECTED] Cc:

RE: Regex command to remove deleted emails

2004-01-28 Thread Tim Johnson
I haven't had a chance to test this, but how about: use strict; use warnings; use File::Find; find(sub{unlink if /,ST$/},/my/directory/); -Original Message- From: news on behalf of John

RE: hash of hash of array slices

2004-01-26 Thread Tim Johnson
I think that only applies to a list slice, i.e. (split /\s+,$_)[3..9], but an array slice doesn't need it, i.e. @array[2] -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED] Sent: Monday, January 26, 2004 9:38 AM To: [EMAIL PROTECTED] Cc: 'Perl Beginners' Subject: RE: hash of

  1   2   3   >