Re: Sorting

2001-11-04 Thread Andrea Holstein
David Stavert schrieb: > > The results of my foreach loop looks like > > <[EMAIL PROTECTED]><[EMAIL PROTECTED]> > <[EMAIL PROTECTED]><[EMAIL PROTECTED]> > <[EMAIL PROTECTED]><[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]><[EMAIL PROTECTED]> > <[EMAIL PROTECTED]><[EMAIL PROTECTED]

RE: Sorting

2001-11-04 Thread David Stavert
The results of my foreach loop looks like <[EMAIL PROTECTED]><[EMAIL PROTECTED]> <[EMAIL PROTECTED]><[EMAIL PROTECTED]> <[EMAIL PROTECTED]><[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]><[EMAIL PROTECTED]> <[EMAIL PROTECTED]><[EMAIL PROTECTED]> <[EMAIL PROTECTED]> and I want to elimi

RE: regexp with $ARGV

2001-11-04 Thread Peter Scott
At 11:38 AM 11/4/01 -0800, Wagner-David wrote: > If you only want to place parens around the input, then you can > just place it parans like: > $ARGV[0] = '(' . $ARGV[0] . ')'; Somewhat clearer: $ARGV[0] = "($ARGV[0])"; > In your original code, you want

Re: (Slightly OT) RE: terminating input

2001-11-04 Thread Paul Johnson
On Sun, Nov 04, 2001 at 12:18:38PM -0800, Dave Storrs wrote: > > > On Sun, 4 Nov 2001, Gary L. Armstrong wrote: > > > I am amazed. How does someone figure out that you can do this sort of thing? > > > > chomp($value[++$i] = ); > > > > I mean, $value[++$i]? That really works? Crazy. [...] >

(Slightly OT) RE: terminating input

2001-11-04 Thread Dave Storrs
On Sun, 4 Nov 2001, Gary L. Armstrong wrote: > I am amazed. How does someone figure out that you can do this sort of thing? > > chomp($value[++$i] = ); > > I mean, $value[++$i]? That really works? Crazy. [...] Well, that's mostly a C-style issue (and yes, it is crazy). C programme

Re: regexp with $ARGV

2001-11-04 Thread Dave Storrs
Martin, I'm not entirely clear on what you're trying to do here, so if this doesn't help, let me know and I'll try again. I think the problem is that you're doing this: s/$ARGV[0]/\($ARGV[0]\)/g ...when you want to affect $ARGV[0]. But remember that s/// and m// are, b

Re: regexp with $ARGV

2001-11-04 Thread Martin Karlsson
Hi! Thanks for your help, I really appreciate it. However, I just don't seem able to figure out how to do it; please have a look at the attached script. Perhaps you can find some stupid rookie-mistake in it which could explain why it's not working the way I want :-). Have a nice week, /Martin * W

OT: dB pooling in Perl (was Re: Perl with Java)

2001-11-04 Thread Dave Storrs
On this subject: I am currently trying to sell Perl in my (highly Java-biased) shop, and having an uphill battle of it. One of the things that the brass wants to see is support for database connection pooling in a multi threaded environment. Now, I'm sure that Perl can do this, but it isn't som

RE: Sorting

2001-11-04 Thread Wagner-David
Uncertain where you want to go: To get a sorted set from a hash, then do: foreach my $MyId (sort keys %recipient) # now sorted by recipient } Is this what you are after? Wags ;) -Original Message- From: David Stavert [mailto:[EMAIL

RE: regexp with $ARGV

2001-11-04 Thread Wagner-David
If you only want to place parens around the input, then you can just place it parans like: $ARGV[0] = '(' . $ARGV[0] . ')'; In your original code, you want to work with $ARGV[0] but the regex w/o inputs assumes: $_ =~ s/$ARGV[0]/\($ARGV[0]\)/g;

Sorting

2001-11-04 Thread David Stavert
I am trying to create a script that runs through a maillog file that collects the to and from addresses for a domain and then sorts out all the unique from addresses to a to address. I am using a foreach loop " foreach $i ( keys %recipient ) " which gives me a list of from addresses to each recip

RE: what is @$data

2001-11-04 Thread Sidharth Malhotra
$data is a reference to an array (kind of like a c pointer): $data = \@somearray; # or $data = [1, 2, 4, 7]; # there are many other ways to create an array ref When you say @$data, you dereference $data into array context because shift requires arrays to work with: my ($type) = shift

Re: unusual function..!!

2001-11-04 Thread Troy Denkinger
On Sunday 04 November 2001 01:02, nafiseh saberi wrote: > I see in many source that...use print <<"TABLE"; > when want to work with html in cgi... > but I dont find this syntax of print ( print <<) in any document of > perl.. why ?!! This is called a "Here document". I don't have my camel

RE: what is @$data

2001-11-04 Thread Wagner-David
Implies that you have I believe an anonymous array element being passed and you are shifting off of the front of the anonymous array into $type. Wags ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 04, 2001 02:33 To: [EMAIL PROTECT

RE: Silly problem

2001-11-04 Thread Gary L. Armstrong
Your regex is wrong. $line is not storing the IP in that case. $line =~ /^(\d+\.\d+.\d+\.\d+)/; #Extact the IP address Should be /^(\d+\.\d+\.\d+\.\d+)/ #See the missing char? Forgot to escape your second dot. OK, so that might match anyway but sloppy regex can be quite nasty. I did this just

RE: terminating input

2001-11-04 Thread Gary L. Armstrong
I am amazed. How does someone figure out that you can do this sort of thing? chomp($value[++$i] = ); I mean, $value[++$i]? That really works? Crazy. I have six Perl books but somehow I am not yet "getting" this language I guess. But you know what I did, last prog I started just trying stuff t

regexp with $ARGV

2001-11-04 Thread Martin Karlsson
Could anyone please show me the way to think here? If I execute a script with an argument, e.g monkey, then monkey will be found in $ARGV[0]. If I then want to highlight the word monkey by putting it in parentheses, i thought something like s/$ARGV[0]/\($ARGV[0]\)/g would do the trick; however it

what is @$data

2001-11-04 Thread [EMAIL PROTECTED]
i have come a cross a array-scalar combo that i cant figure out, maybe someone can help. the line off code is: my ($type) = shift @$data; does the $ in @$data mean to place $type after @data as opposed to before in the new @data? -- - josh N8MSO 20A8 2FC6 9099 D215 78F4 D005 B

Re: TEMPLETE

2001-11-04 Thread Scott Lutz
asign headers and footers: $pageheader = "/path/to/some/directory/pageheader.txt"; $pagefooter = "/path/to/some/directory/pagefooter.txt"; &header; put a bunch of Perl code here to spit out some fancy bits &footer; sub header { open (FILE,"$pageheader"); @pageheaderfile = ; close(FILE)

templete

2001-11-04 Thread nafiseh saberi
hi.. I see in many source that...use print <<"TABLE"; =20 when want to work with html in cgi... but I dont find this syntax of print ( print <<) in any document of perl.. why ?!! thx a lot.. _ Best regards Try to always be hopefull

Re: IPC Question

2001-11-04 Thread nafiseh saberi
I think... you should choose another name for filehandler... it is a reserved world. _ Best regards Try to always be hopefull www.iraninfocenter.net www.electronegar.com www.sorna.net __

IPC Question

2001-11-04 Thread Veeraraju_Mareddi
open(WRITE, "|notepad"); print WRITE "Raju"; This should open a notepad and write Raju to the notepad. But its not doing So WHY??. With Regards Raju -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]