Re: Why did it print a happy face?

2004-03-02 Thread Tim
At 11:29 AM 3/2/04 -0500, you wrote: This is a precursor to a real JAPH signeture (I need to learn more perl before I can write a really obfuscated one), and I have already gotten it to print what it was supposed to, but I changed print chr($letter); to print chr(@word); to see if it would work, wh

Re: loop until key is pressed

2004-03-04 Thread Tim
At 11:00 AM 3/4/04 -0600, you wrote: I'd like to use a while construct to loop until a key, any key, is pressed. I'm aware of the source for input, but with what function do I check for key presses regardless of ? Use the CPAN module Term::ReadKey, and try to read a key in non-blocking mode by

Re: loop until key is pressed

2004-03-04 Thread Tim
At 11:00 AM 3/4/04 -0600, you wrote: I'd like to use a while construct to loop until a key, any key, is pressed. I'm aware of the source for input, but with what function do I check for key presses regardless of ? forgot to add : ReadMode 'cbreak'; before, and ReadMode 'normal'; after. should read

Re: Passing Data Between Servers

2004-03-04 Thread Tim
lace to start. It discusses forking children, blocking and non-blocking I/O, among others, which will be considerations you'll want to make. Tim -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

CPAN

2004-04-08 Thread Tim
orphan in my $HOME ? Thanks for your pointers Tim -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

perl script instances

2004-04-14 Thread Tim
How best to determine if there are other instances of a 9perl) script running under 1) Unix (like) environments B) windows TIA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Why Perl

2004-04-27 Thread Tim
At 10:52 AM 4/27/04 +0530, you wrote: Hi All, Can some list some points where perl really stands out from other languages. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Because it

Win32::OLE question(s)

2005-08-31 Thread Tim
Hello. The following code produces the output below. The first column should be a date. This happens whether the "valof" function is used or not. Anyone have any Variant tricks? Thanks. Tim my $Excel = Win32::OLE->GetActiveObject('Excel.Application')

upgrading

2003-11-06 Thread Tim
ame in /usr/bin (maybe /usr/sbin as well) and all the directories in @INC. Thanks for sharing any relevant experiences. Cheers, Tim email: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: More died on open command (from 55103)

2003-11-10 Thread Tim
At 01:54 PM 11/10/03 -0800, you wrote: I tried modifying the open command ar suggested and got the enclosed errors. Also, I'm working with Activestate Activeperl 5.6 on a Windows 2000. Also, from the syntax of the readdir example, the test is to the left of the readdir command. Does this mean I

Re: Counting (easy!)

2003-11-14 Thread Tim
You need to escape the '@' in your variable: /*** open(FILE, " $email = "[EMAIL PROTECTED]"; while () { print; print if (/$email/); # $OK = 1 if /$email/; } */ At 04:19 PM 11/13/03 -0500, you wrote: I have a list of email addresses in a text file one to a line.

CPAN or ?

2003-11-18 Thread Tim
he 'r' command, but Iam not sure if that refers only to what has been installed by CPAN.pm or what all is in @INC. Any enlightenment would be most appreciated. (While I'm at the well...) My pager in CPAM.pm (less) doesn't seem to page, at least when I do an 'r'. Thanks, pr

Re: matching

2003-11-18 Thread Tim
At 03:18 PM 11/17/03 -0700, you wrote: I have the following code to find a quote in a string and replace it with a slashquote. ie " goes to \" How do I get it to do more than one substitution in the string. $_ = $$Rules{$yes}{rule_desc}; s/"/\\"/; $$Rules{$yes}{rule_desc} = $_; newbie... Put a g

CPAN DBD install problem

2003-12-08 Thread Tim
test -- NOT OK Running make install make test had returned bad status, won't install without force. I am at a loss; could force it, but would like to understand what's going on. TIA, Tim

beginners@perl.org

2003-12-30 Thread Tim
ollowing error: Undefined subroutine &IO::String called at C:/perl/site/lib/Bio/DB/WebDBSeqI.pm line 482. Anybody any idea how to solve this problem? Kind regards Tim -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Writing style

2004-01-09 Thread Tim
From the camel: @sauces = < normal tomato spicy tomato green chile pesto white wine End_Lines At 06:51 AM 1/9/04 -0800, you wrote: Jan Eden wrote: > Hi, > > this is not so much a technical as a stilistic question: How do you indent here-quoted parts? When writing code like

Re: New to PERL and Need Help

2004-01-13 Thread Tim
Once you get the AS PERL working, use ppm or ppm3 (Perl Package Manager) to get DBI/DBD modules (DBD::Oracle) on your system. Connect and you're on your way. There is a book on this subject that will help, I've always found this link to help describe the length of the tunnel... http://www.yapc.o

Re: Apel of VIM was Emacs Wizards

2004-01-14 Thread Tim
At 11:24 AM 1/14/04 -0800, you wrote: ... or trying to make that one liner "perl -pie ''" work right the first time... Isn't that what the "i" is for (with ".bak", of course)? ;-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: usage of Net::Telnet

2004-01-20 Thread Tim
Try using input_log and output_log when you instantiate your telnet class. $obj = new Net::Telnet ([Binmode=> $mode,] [Cmd_remove_mode => $mode,] [Dump_Log => $filename,] [Errmode=> $errmode,]

Re: capturing f1,f2, key presses instantlly

2004-01-21 Thread Tim
use Term::ReadKey; ReadMode 'cbreak'; $key = ReadKey(0); ReadMode 'normal'; At 09:34 AM 1/22/04 +0200, you wrote: hello all, do any one of you know how can i capture f1 and f2 keypresses, and responding to them instantly without pressing enter ?? thanks

Re: Convert Date to week number

2004-01-23 Thread Tim
/ people prefer?) . Rob This message thread made me curious about just what constitutes the first week of the year. Is there a standard definition or are we making one here? Tim -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://lear

Re: array push

2004-01-26 Thread Tim
At 11:17 AM 1/26/04 -0500, you wrote: print "@temparray"; Take the quotes off. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: porting to windows NT

2004-01-26 Thread Tim
Try running dbish or dbish.bat from the cmdline. It usually comes as part of the dbi install and will tell you what drivers you've got and will let you select, connect, and try out some SQL there. You can fine-tune your params with it. At 09:05 PM 1/26/04 +0100, you wrote: From: "Johnson, Sha

RE: Help with options

2004-01-28 Thread Tim
I realize there's no 'help' in this one, but maybe this will get you on your way...(it's a bit of a kluge; I had to check it twice) Here's one with GetOpt::Std : ## use Getopt::Std; my @ARGS; my %opts; eval { getopts('o:L', \%opts) or die "Usage: $0 -o [ mail || fi

Re: function that reads line numbers?

2004-01-29 Thread Tim
This is an example of the range operator '..' , which works with operands on either side. In a scalar context, if either operand is a numeric literal, it is compared to $. , which contains the current line number of the input file. e.g. next if (5 .. /^Foo/); # skips lines 5 up to first lin

Re: Cursor moving in one position

2004-02-09 Thread Tim
This for win32, so you have to escape the double quotes on the inside: perl -e "$|++; while (1) {print \"\b+\";sleep 1;print \"\b-\";sleep 1;}" You'll probably find the use of "\" and "/" to make a spinner (at least under win32) a good way to wait for the paint to dry ;-} At 04:44 PM 2/9/04

Re: How to call perl with in-line contents?

2004-02-13 Thread Tim
The "deep" opinions are interspersed with your original message. An in-line (pardon the "win32-ish-ness" quote escaping) could take the form: perl -ne "BEGIN{open S, '>smf';open L, '>lgf'} chomp;if (/[01]\s*$/){print S \"$_\n\";}else{print L \"$_\n\";}" f1.txt where your data is in f1.txt, your

Re: Perl FTP error?

2004-02-19 Thread Tim
At 10:53 AM 2/19/04 -0700, you wrote: Still new to perl... trying to create an FTP connection to move backups from one machine to another. Code... #!/usr/bin/perl # Backup tyr web directory # to ODIN via FTP # Begin remote transfer of file(s) # use Net::FTP; $ftp = Net::FTP->new("hostname", Debug

Re: Shebang line

2004-02-21 Thread Tim
At 05:38 PM 2/20/04 -0500, you wrote: I am on Windows. Is it okay for me to put a unix style shebang line in my scripts? I would do this for the scripts that I intend to run across platforms. I think the shebang is mostly ignored on Windows. Ex: #!/usr/bin/perl -- To unsubscribe, e-mail: [EMAIL

Re: default value for input

2004-02-24 Thread Tim
At 08:19 PM 2/24/04 +0100, you wrote: Thanks! But the problem is the following: the user has to enter an url and now i want to put "http://"; always in front (and show it on the screen) so that the user doesn't have to enter this everytime. From: Kenton Brede <[EMAIL PROTECTED]> To: [EMAIL PROT

Re: Changing directory and running a program

2004-02-25 Thread Tim
might try having perl run a bat[ch] file... Tim -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: newline or CR with join function

2004-02-26 Thread Tim
At 09:36 AM 2/26/04 -0800, you wrote: Greetings all, Instead of joining my scalars with ',' I'd like each to appear on a newline. Replacing ',' with '\n' doesn't work. Suggestions? Thanks! my $cfor_edu = join (',',$bs_alma,$bs,$ms_alma,$ms); - Do you Yahoo!? Get b

Re: newline or CR with join function

2004-02-26 Thread Tim
Wrong answer, surry! It's that interpolation thing... At 12:45 PM 2/26/04 -0500, you wrote: At 09:36 AM 2/26/04 -0800, you wrote: Greetings all, Instead of joining my scalars with ',' I'd like each to appear on a newline. Replacing ',' with '\n' doesn't work. Suggestions? Thanks! my $cfor_edu = j

Re: Array question

2004-02-27 Thread Tim
At 07:18 PM 2/26/04 -0500, you wrote: Hi Guys, I have a problem with e-mail address's and an array. I have some code that will be a documentation spider to go through all our technical documentation, extract e-mail address's and attempt to sort and exclude certain e-mails/patterns. All documentati

Re[2]: $ENV

2001-06-09 Thread Tim Musson
Hey Philip, I also have an environ.pl file that I use, but it is smaller and I think (?) uses less resources. Can anyone confirm that it is faster and uses less resources to no use CGI for little things? #!/usr/local/bin/perl print "Content-type: text/html\n\n CGI Environment CGI Environm

Re[2]: [META] Rants (was:Re: space)

2001-06-09 Thread Tim Musson
Hey Aaron, Friday, June 08, 2001, 12:51:05 PM, you wrote: AC> I've got to take issue with this. I use Eudora, which for just about AC> everything else is a nice program. Though it's not 100% free of problems AC> and bugs -- it does not have any options for handling lists -- I don't AC> thin

Re[2]: space

2001-06-09 Thread Tim Musson
Hey Chas, Thursday, June 07, 2001, 7:44:11 PM, you wrote: CO> On 07 Jun 2001 19:36:57 -0400, Mark S wrote: >> You could just set up a web server on your own machine, if that's all you're >> looking to do. >> >> >> who knows of some free web space that allows the use of perl? so i can test >> m

Re: Perl and the MicroSoft NT/Win2000 GUI

2001-06-09 Thread Tim Musson
Hey ggage, Friday, June 08, 2001, 12:17:50 PM, you wrote: gmc> I would like to run a perl script and pass in an argument (ARGV[0]) by gmc> dragging a textfile icon on to the perl script icon. This would be on an gmc> NT/Win2000 system using the icons in file manager, desktop, etc. The gmc> arg

Why ./perl/lib & ./perl/site/lib?

2001-06-10 Thread Tim Musson
Hey all, I was wondering why the perl install has both the ./perl/lib and ./perl/site/lib folders? They both seem to have the same type of things (modules, etc...). Why are there both, and why would you choose to put a module you were writing in one or the other? -- [EMAIL PROTECTED] Using Th

Archive old files

2001-06-10 Thread Tim Musson
Perl People, I am the only one at my current contract that knows Perl (and I can't for the life of me figure out why the others don't learn it instead of asking me each time it is needed... ). This time, I thought I would ask the list... The network drives (P: for personal data, etc)

Re[2]: Perl and the MicroSoft NT/Win2000 GUI

2001-06-11 Thread Tim Musson
Thanks Jindra, Monday, June 11, 2001, 10:06:13 AM, you wrote: JV> Workaround is to use pl2bat script which encapsulates the perl JV> source within a .bat file and handles everything as necessary. JV> It is the way already suggested here, I just wanted to point out JV> the PL2BAT script, which i

Re[2]: Installing new Modules problem

2001-06-11 Thread Tim Musson
Hey Evgeny, Monday, June 11, 2001, 4:11:54 PM, you wrote: >> I download a >> module from activestate but when I try to install it I get the following >> error. >> G:\Perl\bin>>>ppm install win32-gui.ppd EGaG> Why not to visit the CPAN, take the tar.gz distribution, open it and run EGaG> perl m

Reformating text

2001-06-15 Thread Tim Musson
Hey Perlers, I have pulled some books from Project Gutenberg (www.Gutenberg.net). What I want to do is take all the Paragraphs and put them on one line, then put them into the Palm DOC format. This way they wrap correctly on the Palm screen. There is no indenting that I care about, so

Re: MS-DOS

2001-06-15 Thread Tim Musson
Hey Crystal, Friday, June 15, 2001, 2:23:41 PM, you wrote: CG> Once upon a time I could use MS-Dos to run my Perl scripts at the C:\Perl CG> prompt. Then use Perl nameofscript.pl or whatever the name was. That isn't CG> working anymore. Anyone have any idea why? What can I do to fix it. I've CG>

Re: Reading Messages.tbb

2001-06-15 Thread Tim Musson
Hey Evgeny, Wednesday, June 13, 2001, 7:13:14 PM, you wrote: EGaG> Hi, EGaG> As I saw some of you are using "TheBat!" mail client, me too. EGaG> I'd like to be able to read it's messages from the script - for that EGaG> I have to know the binary format of "Messages.tbb" files where it keep

#!/perl -w, Strict, & Diagnostics

2001-06-15 Thread Tim Musson
Hey all, I have been using #!/perl -w and based on some posts have started using use Strict; use Diagnostics; as I develop code (all helpful things to do). My question is when I put the code into production, should I leave any of these turned on? I am thinking that they are to help with devel

Re[2]: MS-DOS

2001-06-15 Thread Tim Musson
Hey Mark, Friday, June 15, 2001, 2:48:14 PM, you wrote: MF> Is Perl in your system path? The first line in the script doesn't help MF> any in DOSneyland. I usually just type "perl script.pl" if it is. It is MF> possible to associated the dot-p-l extension with Perl.exe in the MF> Windows GUI, bu

Re: I need help running perl for windows

2001-06-15 Thread Tim Musson
Hey REIGNCandE, Friday, June 15, 2001, 2:39:03 PM, you wrote: Rac> Whenever I try to open my script from the command line (the Rac> infamous "Hello, World" script), I can see hello world! on my Rac> screen for 1 second and then my Perl inturpreter suddenly Rac> disappears off of my screen; Soun

Re[2]: When to use "my"?

2001-06-15 Thread Tim Musson
Hey Brett, Friday, June 15, 2001, 4:28:05 PM, you wrote: BWM> Using "my" puts the variable into a lexical scope and keeps it BWM> out of the global name space. What does lexical mean here? I looked it up in a dictionary, but still am not sure how it applies. -- [EMAIL PROTECTED] Using The Ba

Re[4]: When to use "my"?

2001-06-15 Thread Tim Musson
Hey Paul, Friday, June 15, 2001, 6:50:02 PM, you wrote: PJ> On Fri, Jun 15, 2001 at 06:07:38PM -0400, Tim Musson wrote: >> Hey Brett, >> >> Friday, June 15, 2001, 4:28:05 PM, you wrote: >> >> BWM> Using "my" puts the variable into a lexical sco

Re[2]: Reformating text

2001-06-15 Thread Tim Musson
line seperator to a blank line while (<>) { # read in all paragraphs s/\n/ /g; # remove all new lines in paragraph print OUTfile "$_\n\n"; # print OUTfile paragraph with a blank line after it } print OUTfile "\n\n$header"; # print OUTfile header Friday, June 15,

Re[4]: Reformating text

2001-06-16 Thread Tim Musson
Hey Chas, Saturday, June 16, 2001, 1:47:30 AM, you wrote: CO> On 15 Jun 2001 19:31:39 -0400, Tim Musson wrote: >> Hey Chas, >> >> Thanks, I run Win2k so had to make some changes (the unix \r\n is just >> \n on the M$ OS's). I also had a question. >> &g

Re[6]: Reformating text

2001-06-16 Thread Tim Musson
Hey Me, Saturday, June 16, 2001, 2:03:07 PM, you wrote: >> My next direction is OOP, but I have found it to be a >> little beyond my grasp each time I try. Maybe with this >> list's help I can get it. M> First you have to unlearn. M> Imagine you knew nothing about programming. M> Now, I intr

Re: Problems with LWP::UserAgent and HTTP::Response

2001-06-18 Thread Tim Keefer
Hi Ela, The documentation for perl LWP agent seems sparse. I had a difficult time figuring out how to send multipart form-data. I'll share the code with you that some shared with me. Hope it helps. require LWP; use LWP::UserAgent; use HTTP::Request::Common; # Create a user agent object

Re: RFC on my short recursive code

2001-06-18 Thread Tim Musson
Hey Pete, Not sure why you want to call ls when Perl can do the same thing. I asked the list a similar question (I needed to move old files to a different top directory - retaining the path to each file) a couple weeks ago and got the following. (btw, I run this on Win32, so you will need to cha

Drive cleanup...

2001-06-18 Thread Tim Musson
Hey all you great Perlers, I am helping out my Win32 Server Admin team. They need to clean up the "network drives". Currently ~40Gb of data. We are looking at making 3 passes. 1. Folders - for example the "Windows" and "WinNT" folders (people were asked to backup their *

Re[2]: Getting Started

2001-06-19 Thread Tim Musson
Hey Gary, Tuesday, June 19, 2001, 8:03:23 AM, you wrote: GLA> It's not too late, we can save you, use UNIX... come to the Dark GLA> Side, Luke... Dark side? I thought that was M$ - you know BORG, Dark Side, etc GLA> I'm only sort of kidding but hey, I use a PC as well. Dang GLA> Microsoft. 8<-

Re: Use of File::Copy

2001-06-19 Thread Tim Musson
Hey Fabien, Tuesday, June 19, 2001, 5:05:19 AM, you wrote: FJ> I'm trying to use copy($name,$folder.$name), but it doesn't work! FJ> Yet, I've put "use File::copy" in my program. FJ> I tried with $name = "essai0.flr" and $folder="archive\\" on Win NT4 >From this list I have found that a great

Re[2]: Help: move folder?

2001-06-20 Thread Tim Musson
Hey Brett, Wednesday, June 20, 2001, 8:38:34 AM, you wrote: >> Is there a Perl way to move a folder with out doing it one file at >> a time? (Similar to M$ Windows Explorer where you can drag a folder >> to another folder?) BWM> Of course -- take a look at the File::Copy module. It has a move B

Re[3]: Help: move folder?

2001-06-20 Thread Tim Musson
Ok, I was wrong, the folder is created in the Destination dir, but it is empty, and my perl code gives an error in the die statement... Uncaught exception from user code: Error: Permission denied What am I doing wrong here? >>> Is there a Perl way to move a folder with out doing it one

Re[4]: Help: move folder?

2001-06-20 Thread Tim Musson
Hey Brett, Wednesday, June 20, 2001, 9:51:09 AM, you wrote: BWM> The function may not work across filesystem boundaries, and this BWM> may include networked drives (especially on WinNT -- not sure BWM> what it can do). BWM> I think rename may also be usable, but again, it may have the same BWM>

Re[5]: Help: move folder?

2001-06-20 Thread Tim Musson
Hey Brett, Wednesday, June 20, 2001, 9:52:01 AM, you wrote: >> Uncaught exception from user code: >> Error: Permission denied >> >> What am I doing wrong here? BWM> Perhaps you don't have permission to access the drives or folders BWM> in question? Nope, my test drive is my ThinkPad's

Re: Newbie question about running programs from the command line.

2001-06-20 Thread Tim Musson
Hey SAWMaster, Wednesday, June 20, 2001, 12:10:49 PM, you wrote: S> Hi group. S> Short 'n sweet question. Is there a way to run perl programs from S> the command line without having to precede usage with "perl" I see you are running M$ Win, but which version? What Perl are you running? I have

Re[2]: compilation errors in win98

2001-06-21 Thread Tim Musson
Hey james, Can you change the Properties of the command window? Right click on the blue bar at the top, Properties, then the Layout tab. I typically set it to: Screen Buffer Size: Width 100 Height 300 Window Size: Width80 Height 50 This should work on 98. I run Win2k, but it also work

Re[2]: if statement

2001-06-21 Thread Tim Musson
Hey Jos, I believe you have to use ! instead of "not" also... Wednesday, June 20, 2001, 6:05:39 PM, you wrote: JIB> i'd say, there is no 'like' operator... >> This isn't working for me. Help please. What is wrong with the second if >> statement >> >> while ( ($timestamp, $report_type, $gam

Re: Last page

2001-06-21 Thread Tim Musson
Hey Stéphane, Thursday, June 21, 2001, 8:37:53 AM, you wrote: SJB> How can I get the URL which was calling my script (like SJB> document.referrer in Javascript) SJB> tks This will show you all the available ENV variables pick the one you want and use it as $ENV{HTTP_REFERER} #!/usr/loca

Re[2]: compilation errors in win98

2001-06-21 Thread Tim Musson
Hey james, Thursday, June 21, 2001, 9:26:34 AM, you wrote: jc> The version of DOS I have on win98SE doesn't allow for a scroll jc> bar as suggested by one comment nor does it have a layout tab to jc> set the size of the window although it does allow a set to a jc> maximum of 50 lines. Are you

Re: PPM

2001-06-21 Thread Tim Musson
Hey Nick, Thursday, June 21, 2001, 2:46:11 PM, you wrote: NT> Ok, I am running windows 2000, I have perl, but I do not know NT> which distribution, I do not think that it is activestate's NT> however. I searched by drive and found ppm in a folder in the NT> perl folder, but there is no ex

Re: HELP ME-new to perl

2001-06-22 Thread Tim Musson
Hey sridevi, Friday, June 22, 2001, 3:07:40 AM, you wrote: sa> Hi all, Could anyone briefly explain the difference between sa> the shell script and the scripting language like perl? Thanx in sa> advance, visu sa> __ sa> Do You Yahoo!? sa> Ge

Windows Shortcuts

2001-06-22 Thread Tim Keefer
hello all, Has any one had any luck creating shortcuts for windows NT using Win32::Shortcut module. I have tried the examples in the O'Reilly documentation many times and I still can't create a shortcut. Any help would be appreciated. Thanks, Tim

A better way?

2001-06-22 Thread Tim Musson
Hey all, I have this code fragment. if ($Var eq "String") { &Sub($Var1); } elsif ($Var2 =~ /$STRING/) { &Sub($Var1); } Is this a better way? if (($Var eq "String") || ($Var2 =~ /$STRING/)) { &Sub($Var1); } -- [EMAIL PROTECTED] Using The Bat! eMail v1.53d Windows NT 5.0.2195 (Ser

Re[2]: A better way?

2001-06-22 Thread Tim Musson
Hey iansmith, Friday, June 22, 2001, 10:15:49 PM, you wrote: >> &Sub($Var1); } snip i> You can also leave off the & if you are using Perl 5. I am using the most recent from ActiveState, but I tend to stick the & out there so I can tell at a glance that I am calling a sub. Does it cause p

Re[2]: A better way?

2001-06-22 Thread Tim Musson
Hey Paul, Friday, June 22, 2001, 10:14:28 PM, you wrote: >> if ($Var eq "String") { &Sub($Var1); } elsif ($Var2 =~ >> /$STRING/) { &Sub($Var1); } >> >> Is this a better way? >> >> if (($Var eq "String") || ($Var2 =~ /$STRING/)) { >> &Sub($Var1); >> } P> I like it better. P> Perso

How do i set this?

2001-06-24 Thread Tim Grossner
I am using a for like so: for(@targets) { ...stuff... } What variable can I use to specify the CURRENT target to operate on? for instance: for(@targets) { ...stuff...("VARIABLE THAT IS EQUAL TO THE CURRENT TARGET") } Tim Grossner voice - 217-438-6161 pager - 217-467-3148 cell

Re: How do i set this?

2001-06-24 Thread Tim Grossner
Thats the one I want! Works like a charm now :-) On Sun, 24 Jun 2001, Jos I. Boumans wrote: > Hi, > > I think what you mean is this: > > for(@foo){ print "$_\n" } # ie, $_ holds the element of @foo you're > currently looking at > > you can also explicitly name it like so: > > for my $elem

Opening a file, but adding the date to the name

2001-06-24 Thread Tim Grossner
I want to open a file: open (CONFIG, ">/tftpboot/$_"); chmod (0777, "/tftpboot/$_"); but i want to make the filename be $_."the current date" the localtime function doesnt look very promising, as the output is not very human readable :-) Any thoughts?

For loop...

2001-06-24 Thread Tim Grossner
I am using a for (@targets) loop to connect to cisco routers...if the target is unreachable I need it to go on to the next target in the array @targets. What should I look for? An "else" statement or what? Tim Grossner voice - 217-438-6161 pager - 217-467-3148 cell - 217-971

Re: Opening a file, but adding the date to the name

2001-06-24 Thread Tim Musson
Hey Tim, Sunday, June 24, 2001, 4:33:31 PM, you wrote: TG> but i want to make the filename be $_."the current date" TG> the localtime function doesnt look very promising, as the output is not TG> very human readable :-) I use localtime(time); all the time for this type of

Use perl to "mv" dir?

2001-06-25 Thread Tim Musson
Hey Perlers, I asked this before, but I am still stuck, and never got a workable solution. Is there a way in perl to move a directory? Similar to unix "mv" command where you move a dir to another location (I am not crossing boundaries). I am on M$ Win2k, but the unix "mv" command is

Re[2]: /g

2001-06-25 Thread Tim Musson
Hey Sally, Do you have "Learning Perl"? Chapter 7. Regular Expressions 7.5 Substitutions "If you want the replacement to operate on all possible matches instead of just the first match, append a g to the substitution" Monday, June 25, 2001, 6:21:08 AM, you wrote: S> Cheers, that's all a book ha

Regexp question

2001-06-25 Thread Tim Wood
asy way to put the contents of href="" into a variable, that would be most useful too! I think the expression should look something like (assume string in $str): if ($str =~ m/\/ ) { ...} but then I'm unsure about where the matched text would end up - in $2? Any help greatly appreciated Cheers Tim

Re: Regexp question

2001-06-25 Thread Tim Wood
Drats - just when I got the regexp worked out too... $_=~ m/()/ > > [matching web page links] > > [using regexes] > > Don't use regexes. They aren't the right tools for the task. > > Use one of the cpan modules for parsing web pages. > Some are written specifically for pulling out links. > > htt

use of $_

2001-06-26 Thread Tim Grossner
What actually sets the default variable? I am setting an array up, @targets, and then calling the current object in the array via $_...but if I set another variable after setting up the array, with it takeover the place of $_ ? Tim Grossner voice - 217-438-6161 pager - 217-467-3148 cell

Best practice for config file use?

2001-06-27 Thread Tim Musson
I need to pass a number of parms to my program. Is there a "best Practice" for how to do this? Command line is not something I want to do. I did search on "Config" from search.cpan.org, but it returned 99 modules! Any suggestions? In the past, I have done it by hand, but... --

Re[2]: Best practice for config file use?

2001-06-27 Thread Tim Musson
Hey Jos, Not sure I understand entirely, but I think I usually do #2 also. For example, I tend to do something like this in my code. Comments would be appreciated. (I have not tried to run this particular bit, for example, I was reading and think lc %Hash will tr all the hash value chars to lo

Re[3]: Best practice for config file use?

2001-06-27 Thread Tim Musson
Hey Tim, Wednesday, June 27, 2001, 3:16:45 PM, you wrote: TM> Hey Jos, TM> Not sure I understand entirely, but I think I usually do #2 also. TM> For example, I tend to do something like this in my code. Comments TM> would be appreciated. TM> Is this what you are talking

Re[5]: Best practice for config file use?

2001-06-28 Thread Tim Musson
Hey Jos, I like this option the best of the 3, but it is still hard to give to a non programing person and not expect them to mess up setting the vars... ie, => is what you separate things with, explaining which ' to use (' not `), end each parameter line with a , Wednesday, June 27, 2001, 6:15

Re[7]: Best practice for config file use?

2001-06-30 Thread Tim Musson
Hey Grant, Thursday, June 28, 2001, 5:34:26 PM, my MUA believes you used Internet Mail Service (5.5.2653.19) to write: GM> You might like to check out XML::Simple it was designed for GM> exactly this problem. GM> If you put your config data in a file called foo.xml: GM> GM> foo GM>

Re[2]: ENV & $HOME

2001-06-30 Thread Tim Musson
Hey Michael, Wednesday, June 27, 2001, 3:17:32 AM, my MUA believes you used (X-Mailer not set) to write: MF> On Wed, Jun 27, 2001 at 02:37:55AM -0400, Adam Theo wrote: >> i am looking for a way my perl program can automatically get the >> home directory of the user. >> linux, windows, mac, etc?

Re: need some help ...

2001-07-02 Thread Tim Musson
Hey perl, Monday, July 02, 2001, 5:21:16 AM, my MUA believes you used (X-Mailer not set) to write: pdo> hi, pdo> I want to do this : pdo> i have some servers where i want to check if some files exists and the user pdo> must put the all path with the name of the file ... pdo> use strict; pdo

Re[2]: Agnostic clear command...

2001-07-02 Thread Tim Musson
Hey Michael, Monday, July 02, 2001, 4:32:10 PM, my MUA believes you used (X-Mailer not set) to write: >> You are correct. I believe that the backticks work on the >> shell, so I replace `cls` with system("cls") and at least my screen >> cleared as it was suppose to. MF> Given the code sho

Re: uid

2001-07-02 Thread Tim Musson
Hey RL, Monday, July 02, 2001, 7:13:15 PM, my MUA believes you used QUALCOMM Windows Eudora Version 5.1 to write: Sounds to me like this is more of an OS issue, but here is my stab at answering your questions. RA> We copied some scripts from our old server onto our new one. They RA> are both (A

Best way to match 3 things?

2001-07-03 Thread Tim Musson
PerlGuru's, I had anif {} elsif {}and converted it to the following which I like, but now find I need to match 3 things - not 2. DoTheSub($PassedVar) if ($String eq "string") or ($foo =~ /$String/); I tried adding another "or" to the above, but that did not work (I didn't really think i

Re[2]: Best way to match 3 things?

2001-07-03 Thread Tim Musson
Hey John, Ok, I stand corrected, I guess it was something else that didn't work. Thanks! Tuesday, July 03, 2001, 8:38:02 AM, my MUA believes you used Internet Mail Service (5.5.2653.19) to write: JE> Adding another or works. JE> $String = 0; JE> $foo = 0; JE> $bar = 0; JE> print "Hello" if ($

Re: ActivePerl PPM Question

2001-07-03 Thread Tim Musson
Hey Bill, Tuesday, July 03, 2001, 10:05:47 AM, my MUA believes you used Internet Mail Service (5.5.2653.19) to write: CBT> Hi All CBT> Has anyone used ActivePerl's Perl Package Manager to install CPAN CBT> packages? I down loaded the Tk package and I am trying to install it locally CBT>

Log file creation

2001-07-03 Thread Tim Musson
perlpeople, Is it better to open a log file only when I need to write to it, or open it at the start, and close when done? A few thousand lines in the log... -- [EMAIL PROTECTED] Using The Bat! eMail v1.53d Windows NT 5.0.2195 (Service Pack 1) When in doubt, think.

Re[2]: ActivePerl PPM Question

2001-07-03 Thread Tim Musson
believes you used Internet Mail Service (5.5.2653.19) to write: CBT> HI Tim CBT> Yes, I downloaded the Tk.zip file from ActiveState not CPAN and CBT> got this error. CBT> Tuesday, July 03, 2001, 10:05:47 AM, my MUA believes you used CBT> Internet Mail Service (5.5.2653.19)

Re: Editor

2001-07-03 Thread Tim Musson
Hey Bill, Tuesday, July 03, 2001, 3:33:42 PM, my MUA believes you used Microsoft Outlook Express 5.50.4522.1200 to write: BP> May I get some suggestions for any Windows-based PERL development BP> tools? Preferably, free ones? I like Vim www.vim.org and TextPad www.textpad.com. Both have conte

Re[2]: Using perl scripts on a non perl win32 machine

2001-07-04 Thread Tim Musson
Hey Jos, I would be interested in how you go about running it from the network. For instance, when you install it on a net drive, does @INC reflect the correct locations? Wednesday, July 04, 2001, 3:47:28 AM, my MUA believes you used Microsoft Outlook Express 5.50.4522.1200 to write: JIB> I'm n

Re: Confused

2001-07-04 Thread Tim Musson
Hey RL, Wednesday, July 04, 2001, 9:41:19 PM, my MUA believes you used QUALCOMM Windows Eudora Version 5.1 to write: snip -- RA> When I run it in my ActivePerl.exe window -- RA> nothing happens. Not sure what that is... Did you get your "ActivePerl.exe" window by running perl.exe from W

  1   2   3   4   5   6   7   >