Re: What's the Perl equivalent of this PHP contruct?

2007-03-01 Thread Traeder, Philipp
On Thursday 01 March 2007 06:52, Randall wrote: > I've translated the following PHP snippet: > > $data = array(); > $num = 0; > > $data[$num]['title'] = 'Name'; > $data[$num]['data'] = 'Randall'; > $num++; > > As this Perl: > > my @data; > my $num = 0; > > $data[$num]['title'] = 'Name'; > $dat

redirecting STDOUT/STDERR and File::Copy

2005-03-02 Thread Traeder, Philipp
Hi list, I've got some strange behaviour with redirected STDOUT/STDERR handles and calls to File::Copy - I hope someone can explain me why I'm seeing what I'm seeing here. I use the following code to redirect STDOUT and STDERR to a log file - as you can see, it's more or less copied directly f

Re: Sorry a Java question

2004-12-20 Thread Traeder, Philipp
On Monday 20 December 2004 12:24, Anish Kumar K. wrote: > Hi > > Sorry this is not a question to post here...But searched the net for > java servlet group didn;yt find much... This is definitely not the right list for Java questions - I'd suggest to search Google directly for answers to your ques

Re: Digest MD5 and speed

2004-12-15 Thread Traeder, Philipp
On Wednesday 15 December 2004 15:34, Benjamin Jeeves wrote: > Hi all Hi Benjamin, > > I'm writting a program in perl to md5sum about 500,000 files these files > are text files and have different files size the biggest being about 500KB. > my code is below [..code snipped..] > > The thing is that

Re: parse xml

2004-10-29 Thread Traeder, Philipp
On Friday 29 October 2004 10:44, E.Horn wrote: > geben Sie ein gtpprotein ein > ras > > "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/egquery.dtd";> > > > > > > > ras > > > > > pubmed > PubMed > 27832 >

Re: parse xml

2004-10-25 Thread Traeder, Philipp
On Monday 25 October 2004 16:27, E.Horn wrote: > Hey! > How can i pars this xmlfile? > i just want to have the geo and the count out of > this... > [..] Hi, I can highly recommend XML::Simple - just use it like this: #!/usr/bin/perl -w use strict; use XML::Simple; use Data::Dumper; my $ref =

RE: Counting help

2004-06-16 Thread Traeder, Philipp
[..] > I will try and explain again what I am trying to do. > I read in a file with a list of > roomsThen im trying to list the room once and then count > how many records match for the select statement and only > print the building once with a count in front of it.. > > db: > date build

RE: combining data from more than one file...

2004-05-18 Thread Traeder, Philipp
> Well this is the best I could do thinking through what you said. This > is actually my first time working with hashes. Also, I am > still a PERL > newbie. So, I guess a little helpful code would go a long way. I just > can't figure out how to link the regular expressions to the hash when > s

RE: combining data from more than one file...

2004-05-17 Thread Traeder, Philipp
> Hi all, Hi Michael, > > I am having trouble with combining data from several files, > and I can't > even figure out how to get started. So, I am NOT asking for any code > (though pseudo-code is ok) as I would like to try figuring > this problem > out myself. So, if anyone can give me an

RE: System (" ");

2004-05-06 Thread Traeder, Philipp
> From: Jenda Krynicky [mailto:[EMAIL PROTECTED] > > From: "Traeder, Philipp" <[EMAIL PROTECTED]> [..] > > to me. I'd use something like this: > > > > my (undef, undef, undef, $mday, $mon) = localtime(); > > I would use > > my (

RE: System (" ");

2004-05-06 Thread Traeder, Philipp
Hi Adrian, > running the command: > date|awk '{print $2,$3}' > > provides me with the output I require (i.e. the month and day, May 6). > > however, when I try to call this from within a perl script: > system("date|awk '{print $2,$3}'"); > > I get: > awk: syntax error near line 1 > awk: illegal

RE: Perl on Apache

2004-05-04 Thread Traeder, Philipp
> Now, I placed a file called host.pl, in the cgi-bin folder > > but when I invoke http://127.0.0.1/cgi-bin/host.pl > My browser tries to download this file. > > But I expected Apache/ or Perl to have executed this script. Maybe you're missing some entries in your apache configuration: You need

RE: Newbie: regular expression

2004-05-03 Thread Traeder, Philipp
> On Mon, 2004-05-03 at 10:46, Traeder, Philipp wrote: > > chomp might be the easiest (and probably fastest) solution. > > True :-) But the '\n' he was looking for was in the middle of the > sentence :-) > > BTW, I kept the trailing 'g' in the substi

RE: Newbie: regular expression

2004-05-03 Thread Traeder, Philipp
> The problem is that the second part of the substitution (HI) is not > taken as a regex, but as a string, which is to mean that you're trying > to replace "\n" with "HI\n". > > If you were using > > s/ > (\n) > /HI/xisg; > > instead, you wouldn't have that problem. > > > Now that we've been

RE: ActiveState Win32 MCPAN install problem

2004-04-16 Thread Traeder, Philipp
> -Original Message- > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] > > If you look into C:\Perl\lib\Config.pm you'll find out that > ActivePerl is set to expect "nmake", not "make" and it was compiled > with MS Visual C, not with cygwin so modules compiled with cygwin may > not be compat

RE: ActiveState Win32 MCPAN install problem

2004-04-16 Thread Traeder, Philipp
> -Original Message- > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 16, 2004 8:57 PM > To: [EMAIL PROTECTED] > Subject: RE: ActiveState Win32 MCPAN install problem > > > From: "Michael Weber" <[EMAIL PROTECTED]> > > > Good morning! > > > > > > I am running Active

RE: Regex to match domain for cookie

2004-04-16 Thread Traeder, Philipp
> -Original Message- > From: Babale Fongo [mailto:[EMAIL PROTECTED] > > How do I match a domain name starting from the dot? > > > @domains = ("http://www.domain.com ", "http://www.domain4you.co.uk > "http://www.domain-house.de"; "https//rrp.cash-day.com" > ); > > >

FW: tracking mail logs

2004-04-05 Thread Traeder, Philipp
> -Original Message- > From: Smoot Carl-Mitchell [mailto:[EMAIL PROTECTED] > > On Sun, 04 Apr 2004 18:35:09 -0400 > WC -Sx- Jones <[EMAIL PROTECTED]> wrote: > > > [ BTW - I did se Mail::Toaster and I am currently researching it, > > but it doesn't hurt to ask ... not too painfully anyways.

RE: File Handling

2004-04-05 Thread Traeder, Philipp
Hi Prabu, > I have wrote a script to search for a pattern and replace > it in all files of a directory,that i specified at > commandline.I want another one thing is to be done in the > script.That's,it should search only for the type of files I > specified at commandline.That is,it should

RE: Streaming a file to a remote user

2004-03-26 Thread Traeder, Philipp
> I'm trying to figure out a way to stream a file to a remote > user, and be able to determine that the download completed, > so I can delete the file being streamed. I may be missing an > obvious way to do this, so I'm hoping you all can help me out. > > Here's the sequence of events I'm afte

RE: Re: Re: Sub not working as it should

2004-01-21 Thread Traeder, Philipp
You don't need to be sorry - it's the right choice ;-) Philipp > -Original Message- > > I am sorry I am migrating over to perl (love the built > in debugger) > --- Saadat Saeed <[EMAIL PROTECTED]> wrote: > > Thanks for the quick reponse - looks like I confuse > > my > > vbscript skills a