Re: Regexp

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 19:53:44 GMT, David wrote: > Felix Geerinckx wrote: > >> If you claim something is faster, prove it ;-) >> (But remember, the OP wanted the result in $_). >> > > i only suggest that it might be faster. :-) > i won't go into too much d

Re: Regexp

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 19:01:27 GMT, David wrote: > Felix Geerinckx wrote: >> s/.*\[uuid (.*)\]/$1/; > > this might be a bit faster: > > /(\S+).$/ If you claim something is faster, prove it ;-) (But remember, the OP wanted the result in $_). -- felix -- To unsubs

Re: Forking question.

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 18:21:16 GMT, David wrote: > another thing: >> while ( $#server_list > -1 ) { > > this might never be true. It's true for as long as there are elements in @server_list. It's equivalent to the (imho more readable) while (@server_list) { # do stuff

Re: Regexp

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 12:12:08 GMT, David Samuelsson wrote: > $_ comes in this form: > > servername:D:\CC_Storage\Views\EUSDNKG_Madeleine_Tae68_view.vws [uuid > 74a6b3b0.d1cd11d4.896e.00:b0:d0:83:b4:9b] > > i want $_ to be just the uuid number that is: > 74a6b3b0.d1cd11d4.896e.00:b0:d0:83:b4:9b

Weekly posting statistics - 34/2002

2002-08-26 Thread Felix Geerinckx
lpa Author 46/02195 47 [EMAIL PROTECTED] (David) 34/41550 45 [EMAIL PROTECTED] (Drieux) 30/1 818 27 [EMAIL PROTECTED] (Felix Geerinckx) 28/01456 52 [EMAIL PROTECTED] (John W. Krahn) 16/31106 69 [EMAIL PROTECTED] (Nikola Jan

Re: Read file from second line

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 15:15:06 GMT, [EMAIL PROTECTED] (Q) wrote: > Apologies for such a 'lame' question but i read the FAQ on > http://theoryx5.uwinnipeg.ca/CPAN/perl/pod/perlfaq5-full.html > > How do i read on from the second line of a text file? You start reading from the first line but throw

Re: Forking question.

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 14:15:02 GMT, [EMAIL PROTECTED] (Chad Kellerman) wrote: > I have been trying to work on a script that does forking. > But the script dies in the fork. Here is what I have: > [...] > my $child_limit = 1; > my $child_pids = 0; > $SIG{CHLD} = \&CHILD_COUNT($child_limit); Yo

Re: AW: use Variable as a hashname?

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 12:49:17 GMT, [EMAIL PROTECTED] (Dharmendra rai) wrote: > use foreach keys (%ur_hash_table) What is your point with this single line message? Do you realize that # WRONG foreach keys (%ur_hash_table) { # ... } is a syntax error? Did you test it? Perhaps

Re: What perl module converts unix time to regular time and date

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 12:43:17 GMT, [EMAIL PROTECTED] (Jim-Cont Flaherty) wrote: > What perl module converts unix time to regular time and date ? If you mean with 'unix time' seconds since epoch, and with 'regular time' year, month, day, hour, min and sec, you don't need a module. See

Re: AW: use Variable as a hashname?

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 11:47:00 GMT, [EMAIL PROTECTED] (Angerstein) wrote: [blank lines trimmed] > It a little bit misunderstandable... > let´s say i got 100 hashes named after each of my routers. > a list auf my routeres is in @allmyrouters. > My hashes contains fileds: ip, interfaces, admin. So

Re: Blind patriotism Drieux

2002-08-22 Thread Felix Geerinckx
on Thu, 22 Aug 2002 14:12:23 GMT, [EMAIL PROTECTED] (Drieux) wrote: [political stuff totally unrelated to Perl snipped] C'mon Drieux, get your act together. How difficult can it be to distinguish on list from another? I'm starting to think you are doing this on purpose... -- felix -- To uns

Re: Help with formating text file

2002-08-22 Thread Felix Geerinckx
on Wed, 21 Aug 2002 19:26:35 GMT, [EMAIL PROTECTED] (Zary Necheva) wrote: > I have text file that has data in this format: > >Name: Tammy Johnson > Address 1:3803 Grenton Ave. > City, State: Baltimore, MD > Zip: 21206 > >

Re: substituting a string in a file

2002-08-21 Thread Felix Geerinckx
on Wed, 21 Aug 2002 17:30:17 GMT, David wrote: > Felix Geerinckx wrote: >> s/\d{8}/$date/g; > > s/\d{8}/$date/go; Why are you introducing the compile-once-modifier when there is no variable to interpolate in the pattern? Also, if you are taking on the job of c

Re: substituting a string in a file

2002-08-21 Thread Felix Geerinckx
on Wed, 21 Aug 2002 11:33:06 GMT, [EMAIL PROTECTED] wrote: > I'm trying to substitute all references to a date (of the format > MMDD) in a file to the current date. I'm obviously doing > something wrong here ('cause it doesn't work!:}), as no change is > made to the config.ini file. > open

Re: Net::Telnet problem Timed-out waiting for command prompt

2002-08-21 Thread Felix Geerinckx
on Wed, 21 Aug 2002 11:18:54 GMT, [EMAIL PROTECTED] (Ashish Srivastava) wrote: > i am using Net::Telnet module. > it works fine for some users while for others it give this error > message: Timed-out:waiting for command prompt > I think this problem is concern with mounting of home directory of

Re: Where to start ? Listening to a port ...

2002-08-21 Thread Felix Geerinckx
on Wed, 21 Aug 2002 09:47:49 GMT, [EMAIL PROTECTED] (Connie Chan) wrote: > What my approach is to write my own mail server. So can block > address, or matched content pattern immediately. But what my first > step is ... how to listening to my SMTP port ? Would anybody can > point me to somewhere

Re: regular expression

2002-08-21 Thread Felix Geerinckx
on Wed, 21 Aug 2002 08:02:02 GMT, [EMAIL PROTECTED] (Javeed Sar) wrote: > # I want to grep for files with .dsp or .vbp extensions here, > if the number of files with extension .dsp or .vbp is > 1 i > should exit saying project exists. or else send mail. > > am i doing the right thing? No y

Re: Search Modules

2002-08-20 Thread Felix Geerinckx
on Tue, 20 Aug 2002 22:32:00 GMT, [EMAIL PROTECTED] (Rasoul Hajikhani) wrote: > Can anyone recommend a good string search module? I want to be > able to get possible combinations, permutations, sounds like, > etc... for a given string which will be someone's name. > Thanks in advance. Did you

RE: SQL question

2002-08-20 Thread Felix Geerinckx
on Tue, 20 Aug 2002 19:16:16 GMT, Learn Perl wrote: > Yes I want to have the columns come out in a sorted order without > specifying them like "select col1, col2, col3 from database" because > I have too many columns (close to 80). Is there ways to select a > table w/o specifically telling the S

RE: (Question about a script)

2002-08-20 Thread Felix Geerinckx
on Tue, 20 Aug 2002 18:26:57 GMT, David Zhuo wrote: > -M will not give you a file's last modified time. it gives you > the script's start time minus the last modified time That shouldn't be too much a problem for programs that are completed quicky. And remember, for long running programs, like

Re: need help extracting words from a string

2002-08-20 Thread Felix Geerinckx
on Tue, 20 Aug 2002 16:22:31 GMT, Jessica wrote: > I am attempting to extract a two words or fields from every line of a > tab delimited file. Sometimes the words that I need are in fields 1 & > 2 and other time they are in 2 & 3. The lines look something like > this: > > TypeOfAppApplicati

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

2002-08-20 Thread Felix Geerinckx
on Tue, 20 Aug 2002 14:05:19 GMT, [EMAIL PROTECTED] (Daryl J. Hoyt) wrote: > I am looking for a way to run something like a cron job on > windows. Take your pick. -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Weekly posting ststistics - 33/2002

2002-08-19 Thread Felix Geerinckx
lpa Author 38/61929 50 [EMAIL PROTECTED] (Drieux) 20/4 912 45 [EMAIL PROTECTED] (Connie Chan) 16/7 795 49 [EMAIL PROTECTED] (Nikola Janceski) 15/2 495 33 [EMAIL PROTECTED] (Felix Geerinckx) 14/0 430 30 [EMAIL PROTECTED] (Sudar

Re: Problems using glob()

2002-08-19 Thread Felix Geerinckx
on Mon, 19 Aug 2002 10:09:16 GMT, [EMAIL PROTECTED] (Jochen Berger) wrote: > I've got a problem with a Perl Script I wrote to find files > matching a special pattern. It worked fine until I commented it. > From that time on the program has got problems with that WIN32 > feature called "You want

Re: Using a external Config file

2002-08-19 Thread Felix Geerinckx
on Mon, 19 Aug 2002 00:47:49 GMT, [EMAIL PROTECTED] (Andrew Bogecho) wrote: > I would like to know how I can setup an external config file whose > variables I can then use in a perl script. [...] > I know that this can be done by setting up Config as Config.pm and > get the variables with a "u

Re: Have you followed the Open Source Community???? was Re: Tom Clancy, to David Perkins

2002-08-18 Thread Felix Geerinckx
on Sun, 18 Aug 2002 19:36:38 GMT, Drieux wrote: > What you will also observe here is that various persons on > this list engage in the dangerous practice of "confirming" > various types of speculation with the intent to do damage > to our intelligence and foreign service community. Huh? Another

Re: Did you ever think... (was) RE: Terrorists, to Jim

2002-08-16 Thread Felix Geerinckx
on Fri, 16 Aug 2002 14:49:41 GMT, Drieux wrote: > On Friday, August 16, 2002, at 06:49 , irish wrote: > >> GF: >> >>> However, H. is a fascist himself. That's precisely why the US >>> supported him for so many years. He killed all the trade unionists >>> and communists in Iraq that he could find

Re: Compare dates

2002-08-15 Thread Felix Geerinckx
on Thu, 15 Aug 2002 05:05:15 GMT, Shane Laffin wrote: > How do I compare two dates in the format: > > Thu Aug 15 2002 15:12:02 > > to return if one date is higher than the other. > > Does anyone have any ideas on suitable modules, most > the date modules I have looked at do

Re: writing short code to perform same?

2002-08-15 Thread Felix Geerinckx
on Thu, 15 Aug 2002 08:40:16 GMT, Shivani wrote: > my $line="abcdefgh"; > > i want output which has 8 lines: > 1st outline: abcdefgh > 2nd outline:ab bc cd de ef fg gh > 3nd outline:abc bcd cde def efg fgh > 4th outline...so on > > please let me know the shortest code tp perform this. i can

Re: New to Perl...

2002-08-14 Thread Felix Geerinckx
on Wed, 14 Aug 2002 15:27:43 GMT, [EMAIL PROTECTED] (Tang Kim) wrote: > I need to learn Perl fast, have some C and 4GL background. What > is the best way for me to start? I have 2 books that I have > started looking at. Programming Perl by Wall, Christiansen & > Schwartz and Perl Cookbook by C

[OT] RE: News from Prague

2002-08-14 Thread Felix Geerinckx
on Wed, 14 Aug 2002 14:53:47 GMT, [EMAIL PROTECTED] (Timothy Johnson) wrote: > > I thought Coke was it... > > -Original Message- > From: Nikola Janceski [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 14, 2002 4:43 PM > To: 'drieux'; begin begin > Subject: RE: News from Prague >

Re: open file into hash

2002-08-14 Thread Felix Geerinckx
on Wed, 14 Aug 2002 07:35:29 GMT, [EMAIL PROTECTED] (Jose Malacara) wrote: > I have a file called people.data, which contains two colums: > jose 2 > karen 8 > jason 9 > tracey 1 > Can someone tell me what I am doing wrong here: > #! /usr/bin/perl -w > open (INPUT,

Re: Help with IO::Socket::INET

2002-08-13 Thread Felix Geerinckx
on Wed, 14 Aug 2002 02:32:30 GMT, [EMAIL PROTECTED] (Tim Musson) wrote: > Ok, can you point me to an example? I have never used that module > before, and it has been probably 4 years since I have done something > like this. From a browser what would happen is > 1. hit the router/switch > 2. res

Re: Quick regexp help!

2002-08-13 Thread Felix Geerinckx
on Tue, 13 Aug 2002 09:01:22 GMT, [EMAIL PROTECTED] (David Samuelsson) wrote: > how do i only get the first part from this? > > RTFRT_flu@23460@\GE_Machine <- replica:GE_Machine_KI@\GE_Machine > > i get this value in $_, now i want to remove anything that is > after <- including the arrow (wha

Re: maildir help

2002-08-13 Thread Felix Geerinckx
on Mon, 12 Aug 2002 21:35:32 GMT, [EMAIL PROTECTED] (Majid Tahir) wrote: > does anyone know of any perl modules that can be used to retrieve > mail using the Maildir format...i am new at this so any sample > code also would be greatly appreciated A quick search on the CPAN:

Re: too new

2002-08-13 Thread Felix Geerinckx
on Mon, 12 Aug 2002 22:37:02 GMT, [EMAIL PROTECTED] (Nicole Jones) wrote: > I am just trying to get perl to install on my server. It's Win2k > with IIS. I've got it installed, but I can't seem to run any > scripts. Can anyone point me to a good resource to figure this > out? You could start

Weekly posting statistics - 32/2002

2002-08-12 Thread Felix Geerinckx
lpa Author 28/01063 37 [EMAIL PROTECTED] (John W. Krahn) 21/1 524 24 [EMAIL PROTECTED] (Felix Geerinckx) 18/11206 67 [EMAIL PROTECTED] (Drieux) 18/41132 62 [EMAIL PROTECTED] (Nikola Janceski) 14/0 557 39 [EMAIL PROTECTE

Re: Still got stuck in Hashes...

2002-08-12 Thread Felix Geerinckx
on Mon, 12 Aug 2002 08:08:18 GMT, [EMAIL PROTECTED] (Theuerkorn Johannes) wrote: I hope you don't mind me saying so, but you have written some quite horrible (unmaintainable) code here ;-) I'll try to give some general comments. If you would give us some more details about your datamodel and

Re: if statement

2002-08-12 Thread Felix Geerinckx
on Mon, 12 Aug 2002 13:45:21 GMT, [EMAIL PROTECTED] (Sudarshan Raghavan) wrote: > Instead of these multiple conditions why not create a hash of files > that cannot be checkedout. Something like, > my %cannot_co = ( comEPRHelp => 1, ); > > After this your condition will be > if (($check_ou

Re: if statement

2002-08-12 Thread Felix Geerinckx
on Mon, 12 Aug 2002 07:32:48 GMT, [EMAIL PROTECTED] (Javeed Sar) wrote: > I want the if statement to compare this also: > (($var5 == "Soarian_Context_Sensitive_Coordination_File") | > ($var5 == > "comEPRHelp") | ($var5 == > "CDMS_Context_Sensitive_Coordination_File") | If you want to compa

RE: regx way

2002-08-09 Thread Felix Geerinckx
on Fri, 09 Aug 2002 12:35:25 GMT, [EMAIL PROTECTED] (Jerry Preston) wrote: > Thanks about "^^^". I forget to say that I will not know what the > date is, anyone can change it. If you don't have other 6-digit substrings in your input string, you can use #! /usr/bin/perl -w use strict;

Re: regx way

2002-08-09 Thread Felix Geerinckx
on Fri, 09 Aug 2002 11:30:54 GMT, [EMAIL PROTECTED] (Jerry Preston) wrote: > I am looking for a simple way to replace a date in a string: > >"%makesql(FORD,waf_end,010602 &nowdate,all,0,pdv.CHEVY);\n", > > to >"%makesql(FORD,waf_end,0

Re: how to define default params for subroutines?

2002-08-09 Thread Felix Geerinckx
on Fri, 09 Aug 2002 09:11:24 GMT, [EMAIL PROTECTED] (John W. Krahn) wrote: > sub mysub { > my $a = shift; > my $b = shift || 5; > } This only works when 0 or '' are not allowed for the second parameter. my $a = $_[0]; my $b = defined($_[1]) ? $_[1] : 5; takes care of this. An e

Re: printing to the top of a file

2002-08-09 Thread Felix Geerinckx
on Fri, 09 Aug 2002 08:54:01 GMT, [EMAIL PROTECTED] (Stephen Redding) wrote: > I have a text file that i want to insert two lines to the top of. > how do i do this? This is frequently asked question (FAQ). You can look up the answer by typing the following at your command prompt: perldoc

Re: module installation cant find dependencies

2002-08-02 Thread Felix Geerinckx
on Fri, 02 Aug 2002 20:29:46 GMT, Drieux wrote: > ### #!/usr/bin/perl -w > ### use strict; > > [...some code snipped...] > > ### system($cmd); > ### #system("make test"); > ### #system("make install"); > ### But this code doesn't do anything ;-) -- felix -- To unsubscribe, e-mail: [EMAIL PR

Re: Complex numbers

2002-08-02 Thread Felix Geerinckx
on Fri, 02 Aug 2002 11:20:41 GMT, [EMAIL PROTECTED] (James Campbell) wrote: > Anyone no if there is a way of getting ActiveState's perl to > handle complex numbers? > > The ActiveState home page has info on Math::Cephes::Complex but > when I use ppm3 to try and find this > > Nothing... > > An

Re: newbie syntax error - Perl 4 -> Perl 5.6.1

2002-08-02 Thread Felix Geerinckx
on Thu, 01 Aug 2002 22:10:41 GMT, [EMAIL PROTECTED] (Robert Larmon) wrote: > Okay, so I'm a total Perl newbie. I have an old script (that I > unfortunately inherited) that I'd like to convert to Perl 5. I > copied it over, and I get a syntax error. I went to perl.org, > perl.com, etc., but c

RE: pattern matching

2002-08-01 Thread Felix Geerinckx
on Thu, 01 Aug 2002 19:06:55 GMT, Learn Perl wrote: > $hash{$key} = "$hash{$key}","$_"; #I want to concatenate You are not concatenating here. You are assigning "$hash{$key}" to $hash{$key} and then throw away "$_". Perl would have told you this if you had turned on warnings. String concatenat

Re: pattern matching

2002-08-01 Thread Felix Geerinckx
on Thu, 01 Aug 2002 18:18:27 GMT, Learn Perl wrote: > how do I find the line with only the "<" character? > > and store that line in a hash and the rest chomp them and store them > as the hash value? This stores the (chomped) lines as strings in an anonymous array: #! perl -w use stric

Monthly posting statistics - July 2002

2002-08-01 Thread Felix Geerinckx
anceski) 66/04142 62 [EMAIL PROTECTED] (Timothy Johnson) 62/61601 25 [EMAIL PROTECTED] (Felix Geerinckx) 58/01876 32 [EMAIL PROTECTED] (Janek Schleicher) 51/02045 40 [EMAIL PROTECTED] (Jenda Krynicky) 45/02089 46 [EMAIL PROTECTED] (Bob Showalter) -- fe

RE: Regexp to match by hash key...

2002-08-01 Thread Felix Geerinckx
on Thu, 01 Aug 2002 17:14:40 GMT, Nkuipers wrote: > my %hash = (1 => 'abc', > 2 => 'xyz'); > > anything to the left of the big-arrow is implicitly quoted as well. Not *anything*, only bare identifiers. Consider my %hash = ( 0123 => 'Watch out!' ); print "'$_'" for (keys

RE: Need to extract just the mac id

2002-08-01 Thread Felix Geerinckx
on Thu, 01 Aug 2002 16:15:33 GMT, Nkuipers wrote: > Could you please elaborate on the nested character-class brackets and > colon use, or point me in the right direction; I am not familiar with > that notation. Search perldoc perlre for 'POSIX character class syntax' for an explanation

RE: Sort table with dynamic order of fields [Part 1]

2002-07-31 Thread Felix Geerinckx
on Wed, 31 Jul 2002 17:47:09 GMT, Timothy Johnson wrote: > IMHO = In My Humble Opinion > > RTFM = Read The Freaking Manual > > TMAMYEHTU = Too Many Acronyms Make Your Emails Hard To Understand Strange, I didn't find that last one at -- felix --

Re: Sort table with dynamic order of fields

2002-07-31 Thread Felix Geerinckx
on Wed, 31 Jul 2002 12:56:17 GMT, [EMAIL PROTECTED] (Connie Chan) wrote: > What I have now is something like this : > @ID = qw (Foo Bar Blaz Bob); > @Country = qw (UK US HK HK); > @Gender = qw (F M M F); Using parallel arrays to store related data is not a good idea imho. I would use an (anonym

Re: Fw: Help, I suppose.

2002-07-31 Thread Felix Geerinckx
on Tue, 30 Jul 2002 16:45:26 GMT, [EMAIL PROTECTED] (Tómas guðmundsson) wrote: >> But what do I do to make it more than just the phone number so if >> I ask of Fred it shows his number, address, e-mail, and such ? >> >> my %phone_book = qw( >> Fred [EMAIL PROTECTED] 0123 fred'sstreet 34 >>

Re: One stupid question

2002-07-30 Thread Felix Geerinckx
on Tue, 30 Jul 2002 18:27:18 GMT, [EMAIL PROTECTED] (Brian Bratcher) wrote: > what is the difference between: > > my $number = 200; > and > $number = 200; > ? You should read e.g. M-J Dominus' article 'Coping with Scoping' at -- felix -- T

Re: your frank opinion requested

2002-07-30 Thread Felix Geerinckx
on Tue, 30 Jul 2002 17:22:53 GMT, Nkuipers wrote: > for someone who intends to pursue Perl while he's still breathing, > would you recommend purchasing the Cookbook as an investment in > skills and time-saving? Yes, without any doubt whatsoever. But why don't you convince yourself, and look at

Re: How initialize hash inside a while loop ?

2002-07-30 Thread Felix Geerinckx
on Tue, 30 Jul 2002 10:51:56 GMT, [EMAIL PROTECTED] (Jean Berthold) wrote: > In my case : > > my @array ; > my $counter = 0 ; > # how to declare the prototype for the record used below ??? > my $record = { FS, SNAP_PATH, TAPE_POS } ; # don't function ... There is no need to declare a prototype

Re: Any better way to make 1000000 becomes 1,000,000 ?

2002-07-30 Thread Felix Geerinckx
on Tue, 30 Jul 2002 07:12:30 GMT, [EMAIL PROTECTED] (Connie Chan) wrote: > I have this script to make an integer with comma at every 3 > digits, from right to left. (What should this presentation way > name actaully ?? ) Like 123456 will becomes 123,456. Is there > anyway can making this simpler

Weekly posting statistics - 30/2002

2002-07-29 Thread Felix Geerinckx
Weekly posting statistics for perl.beginners - week 30 of 2002. >From Monday 2002-07-22 to Sunday 2002-07-28 there were 430 articles posted (20001 lines) by 117 authors, giving an average 3.68 articles per author, and an average article length of 47 lpa. The average number of articles per day w

Re: Calculate previous hour?

2002-07-29 Thread Felix Geerinckx
on Mon, 29 Jul 2002 15:33:19 GMT, [EMAIL PROTECTED] (Kevin Old) wrote: > This code does it, but I need to maintain the format "09". > > $hour = (localtime)[2]; > $hour--; #adjust hour to previous > > I know about using printf, but I don't need to print this value. > I need to use it as a va

Re: strange GMT Time

2002-07-26 Thread Felix Geerinckx
on Fri, 26 Jul 2002 18:51:24 GMT, Jeff 'Japhy' Pinyan wrote: > On Jul 26, lz said: > >>I use Perl gmttime() to obtain UTC Time (formerly >>known as GMT Time) and unfortunately, value returned >>does not match official UTC time format: >> >>Official UTC Time Format = YYMMDDHHMMZ >> >>and here is

Re: dividing the string

2002-07-26 Thread Felix Geerinckx
on Fri, 26 Jul 2002 19:46:26 GMT, Lz wrote: > If I have this string: > > $currYear = 2002; That's not a string, it's a number. > > How can I remove first two digits? Would you care to show us what you have already tried? -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: directory scanning

2002-07-25 Thread Felix Geerinckx
on Thu, 25 Jul 2002 16:18:00 GMT, Zentara wrote: > I checked the files with a hexdiff program and > they are identical. I wonder if Digest::MD5 can > be trusted??? Oh yes, it can. You should reread perldoc Digest::MD5 the md5_hex function expects data as its argument, not a filename. You

Re: del files

2002-07-25 Thread Felix Geerinckx
on Thu, 25 Jul 2002 06:58:03 GMT, Javeed Sar wrote: If you had used strict, Perl would have noticed the problem. > #!c:\perl\bin\perl > @privates =`cleartool lsprivate -tag jav_test -other`; > #print "@privates"; > #print "Enter a pattern:"; > #my $pattern =<>; > #chomp $pattern; > foreach (@

Weekly posting statistics - 29/2002

2002-07-22 Thread Felix Geerinckx
Weekly posting statistics for perl.beginners - week 29 of 2002. >From Monday 2002-07-15 to Sunday 2002-07-21 there were 513 articles posted (24414 lines) by 133 authors, giving an average 3.86 articles per author, and an average article length of 48 lpa. The average number of articles per day w

Re: Regular expressions

2002-07-19 Thread Felix Geerinckx
on Fri, 19 Jul 2002 11:39:21 GMT, Matt Wetherill wrote: > Now I know that the perl function localtime returns a date formatted > like: > > Fri Jul 19 12:20:26 2002 > > So I'm nearly there - all I need to do is remove the 'day of the > week' from the start of the string (e.g. Fri ) and the time

Re: Wait

2002-07-16 Thread Felix Geerinckx
on Tue, 16 Jul 2002 12:18:58 GMT, Francesco Guglielmo wrote: > How can I say to my script to wait some seconds before continuing? sleep($number_of_seconds); See perldoc -f sleep -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Weekly posting statistics - 28/2002

2002-07-15 Thread Felix Geerinckx
lpa Author 34/91554 45 [EMAIL PROTECTED] (Connie Chan) 28/11763 62 [EMAIL PROTECTED] (Drieux) 23/1 540 23 [EMAIL PROTECTED] (Felix Geerinckx) 18/0 679 37 [EMAIL PROTECTED] (John W. Krahn) 17/01347 79 [EMAIL PROTECTED] (Ti

Re: Using win32::ChangeNotify

2002-07-15 Thread Felix Geerinckx
on Mon, 15 Jul 2002 11:08:48 GMT, Rupert Heesom wrote: > I'm struggling to implement the win32::Changenotify method in a > script. > > [...] > > The relevent code snippet : > $NewTIFF = Win32::ChangeNotify->new("i:\\",True,"FILE_NAME"); > while(True) > { > > $NewTIFF->wait or warn "Someth

Re: get page with IO::Socket , but having trouble saving to file

2002-07-13 Thread Felix Geerinckx
on Sat, 13 Jul 2002 15:06:38 GMT, Jim-Cont Flaherty wrote: > Hello, get page with IO::Socket , but having trouble saving to file > > This is what I got: > [code snipped] > Help , what am I doing Wrong ?? You are trying to reinvent the wheel instead of using LWP::Simple. perldoc LWP::

Re: Any warning if I use '03E9' like string as a key in hash ?

2002-07-13 Thread Felix Geerinckx
on Sat, 13 Jul 2002 10:42:23 GMT, Connie Chan wrote: > But what I most consider is that, if I use numeric format as hash > key will cause any error. As long as other programming langs I > learnt, I know var name should not in numeric format, but the > grey zone for me in this case is that I can

Re: How can I get element location in array ?

2002-07-13 Thread Felix Geerinckx
on Fri, 12 Jul 2002 21:14:19 GMT, Connie Chan wrote: > Right, I better set $GetLocation = -1, but, what I am looking for > is if there is something working like grep does ? > > @elemLoc = grepIndex (/pattern/, @list); # something like that ? > > And is that I can't aviod to use loop to search f

Re: Newbie about

2002-07-13 Thread Felix Geerinckx
on Sat, 13 Jul 2002 07:30:35 GMT, Mark "Thumper" Weisman wrote: >I've got an easy one probably, however, I can't figure it out. I'm > writing a command line script which asks the user to complete some > simple information. I use the pushing the value into a > variable, however when I got to

Re: How to pipe perl script

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 20:35:45 GMT, wrote: > hello, my current project involves piping data to the perl script. > > perlscript.pl | cat data_file > > but unfortunately, the data_file is printed out by cat command If you want to pipe data *to* the Perl program, it should be on the right of the

Re: Syntax error in Win32:CopyFile()

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 19:47:35 GMT, Rupert Heesom wrote: > I'm stuck again! > > "C:\Perl\TIFFPDF>perl -d tiffpdf.pl > usage: Win32::CopyFile($from, $to, $overwrite) at tiffpdf.pl line 39, > line 6." > > The code line is: Win32::CopyFile $CurrTIFFDir."\\".$_.".tif", > $WorkDir."\\ImageMagick";

Re: printing to 2 seperate places simultaneously

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 15:49:59 GMT, Mark Henry wrote: > I want a script to print log messages to a file, and within the same > statement, to the screen (STDOUT) simultaneously. Can the print > statement be coerced into doing this, or is there another way of > achieving the same result? If you hav

re: open command

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 12:03:06 GMT, William Black wrote: > I'm using the open command with the pipe. For some reason this > doesn't work. Can anyone tell me why? > > open(MAIL,"| mail -s $subject $contact[0]->{email}") || die "can't > create"; Works for me. Could you be more specific wrt "doesn

Re: perl equivalent of `trap'

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 06:43:34 GMT, Harry Putnam wrote: > Probably get horse whipped for this one, but what is the perl > equivalent of shell `trap' function. > > `perldoc -f trap' lets me know there isn't one of the same name. > > Where does one read about it? Read about 'Signals' in

Re: What is this string type? How to play with?

2002-07-10 Thread Felix Geerinckx
on Wed, 10 Jul 2002 22:50:56 GMT, Connie Chan wrote: > OO!!... Thanks a lot, I got the hint now !! =) > but I think what I want is uri_escape(uri_unescape($string)) > > Anyway, is that kind of string called "Escape String" ? An "URI Escaped string", to be correctly (hence the name of the mudul

Re: Stumped by "Learning Perl" example

2002-07-10 Thread Felix Geerinckx
on Wed, 10 Jul 2002 22:44:43 GMT, Drieux wrote: > then do remember to set your stty correctly or you get: There is no way to set stty on Win2K, let alone correctly. -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: What is this string type? How to play with?

2002-07-10 Thread Felix Geerinckx
on Wed, 10 Jul 2002 22:21:55 GMT, Connie Chan wrote: > With get method from form, we always see that the > $ENV{QUERY_STRING} like this : > &message=%20%2F%15+...&... > > btw, what is the name of that string in types of ? Escape ? Unicode ? > > With simple tr/// and s///, I can get back wh

Re: Stumped by "Learning Perl" example

2002-07-10 Thread Felix Geerinckx
on Wed, 10 Jul 2002 22:14:04 GMT, Mark M. Andrich wrote: > [code snipped] > I'm using Perl Builder 2.2 on Win 2K. When I run the script, I get the > initial sentence and enter my input in the I/O box, after that nothing > happens. Either I can't seem to find the right combination to break out > o

Re: Insert Var in Regex Problem

2002-07-10 Thread Felix Geerinckx
on Wed, 10 Jul 2002 22:05:58 GMT, Connie Chan wrote: > Say, I have an input $x = "ABCDEF"; > and I will try to remove $x from a string, > what can I do ? > > Is there something like : > > $x =~ s/$x//g; That's just a complicated way to say $x = ''; But this works: #! perl -w u

Re: Using grep with Win32 perl?

2002-07-10 Thread Felix Geerinckx
on Wed, 10 Jul 2002 14:10:17 GMT, [EMAIL PROTECTED] (Rupert Heesom) wrote: > Can I assume that it's not possible to use grep in a Win32 perl > script? There is grep-the-command-line-tool, which you would call using e.g. $output = `grep whatever`; and which is not included with a Win3

Re: Date and Time

2002-07-10 Thread Felix Geerinckx
on Tue, 09 Jul 2002 22:12:52 GMT, [EMAIL PROTECTED] wrote: > I'm trying to get my script to recognize the date and time. > I thought I had it but I keep getting errors all over. > > Please take a look and tell me whats wrong > [...] > sub get_date { > ($sec,$min,$hour,$mday,$mon,$year,$wday,

Re: Docs on how to use the Win32:ChangeNotify module

2002-07-09 Thread Felix Geerinckx
on Tue, 09 Jul 2002 20:26:12 GMT, Jenda Krynicky wrote: > You mean that you get notified of a change, start processing it and > before you have the chance to start waiting again another change > occures but you do not notice it at all? Well I don't really know. I did some additional research i

Re: Docs on how to use the Win32:ChangeNotify module

2002-07-09 Thread Felix Geerinckx
on Tue, 09 Jul 2002 16:01:12 GMT, Jenda Krynicky wrote: > So, your process gets notified if something happens in the directory, > it has to find out what was it by itself. I wonder how one could avoid race conditions when using ChangeNotify. -- felix -- To unsubscribe, e-mail: [EMAIL PROTEC

Re: Request

2002-07-09 Thread Felix Geerinckx
on Tue, 09 Jul 2002 12:18:16 GMT, [EMAIL PROTECTED] (Jenda Krynicky) wrote: > Do use meaningfull subjects !!! You are absolutely right of course, but please follow your own advice. ('Request' doesn't look that meaningful to me ;-) -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

Re: Enumerate Printers

2002-07-09 Thread Felix Geerinckx
on Mon, 08 Jul 2002 17:23:15 GMT, [EMAIL PROTECTED] (Keith) wrote: > Is there a way to enumerate printers on a NT/W2K print server via > PERL?? It's Perl, not PERL. See perldoc Win32::Netresource especially the second example, which almost does what you want. -- felix -- To unsubs

Weekly posting statistics - 27/2002

2002-07-08 Thread Felix Geerinckx
lpa Author 21/11025 48 [EMAIL PROTECTED] (Drieux) 17/51261 74 [EMAIL PROTECTED] (Nigel Peck) 17/2 829 48 [EMAIL PROTECTED] (Connie Chan) 17/2 378 22 [EMAIL PROTECTED] (Felix Geerinckx) 16/01001 62 [EMAIL PROTECTED] (Timothy Jo

Re: passing scalar to function

2002-07-08 Thread Felix Geerinckx
on Mon, 08 Jul 2002 12:52:59 GMT, [EMAIL PROTECTED] (Steven Massey) wrote: > I am missing something in using functions(methinks) > > I simple want pass a scalar variable of 02072002, I can get it to > work by treating it as an array - but this seems daft.. > > sub getD { >

Re: Including Every Option/Need a genius

2002-07-08 Thread Felix Geerinckx
on Mon, 08 Jul 2002 12:30:48 GMT, [EMAIL PROTECTED] (Patricia Hinman) wrote: > I'm creating code that takes a list of attributes and > puts together each possible attribute with the item. > > This is a matter of not knowing where to increase the > indexes at. And not knowing how to assign the i

Re: Modules

2002-07-06 Thread Felix Geerinckx
on Sat, 06 Jul 2002 14:44:52 GMT, Drieux wrote: > [jeeves:~] drieux% perl -MFoo::Bob -e 'use Foo::Bob' Why are you trying to load Foo::Bob twice? -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: copy files

2002-07-06 Thread Felix Geerinckx
on Sat, 06 Jul 2002 12:37:39 GMT, T. B. Booher wrote: > I know that 'rename' moves files from one place to another, but how do > you copy files in perl? See perldoc File::Copy -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: DBI problem -- Fetch() without execute() error on trivial case.

2002-07-03 Thread Felix Geerinckx
on Wed, 03 Jul 2002 18:55:25 GMT, <[EMAIL PROTECTED]> wrote: > I've been lurking for a few months and figured I'd pose a question > that I've been banging my head against for a while. (I've already told this in another thread today: Don't do this, it hurts :-) > If anyone can recommend a good

Re: Correlating Log entries

2002-07-03 Thread Felix Geerinckx
on Wed, 03 Jul 2002 13:56:22 GMT, Anders Holm wrote: > I'm banging my head in trying to get the logic behind doing this, so > any pointers are appreciated.. (Don't do that, it hurts ;-) > AlarmInd:At=1025647244084,Point=Adm.Monitor,Text=process stops due to > client disconnected,Code=1, > > So

Re: write array refs shorter?

2002-07-03 Thread Felix Geerinckx
on Wed, 03 Jul 2002 09:51:37 GMT, Michael Rauh wrote: > that's ok, but is it possible to put especially the > > my $arrayRef1 = shift; > my @array1 = @$arrayRef1; > > into one expression? my @array1 = @{+shift}; or my @array1 = @{shift()}; -- felix -- To unsubscribe, e-mail: [EM

Re: How would I go about "watching a directory"?

2002-07-02 Thread Felix Geerinckx
on Tue, 02 Jul 2002 13:57:59 GMT, Rupert Heesom wrote: > I want to set up a perl script under W2K to watch a set of > directories for new files. See Win32::ChangeNotify > Another secondary question would be "How do I daemonise a script?" > under W2K? See

Re: Send scripts via ssh@cesr.fr

2002-07-02 Thread Felix Geerinckx
on Tue, 02 Jul 2002 10:22:24 GMT, Sebastien Maret wrote: > Hi there, > I was wondering how to send commands on a distant machine via ssh in > a perl script. > I tryed this: > > open(REMOTE, " | ssh remote.domain.fr "); > print REMOTE "firstcommand"; > print REMOTE "secondcommand"; Did you chec

<    1   2   3   4   5   >