make CPAN::Shell->i; print to a filehandle

2003-06-27 Thread Harry Putnam
How do I go about making the output from CPAN::Shell->i; go into a file handle Instead of STDOUT like it does in this formulation: $target = "somefile"; if($opt_r){ open(FH,">$target") or die "Cannot open $target: $!"; print FH CPAN::Shell->i; } } -- To unsubscribe, e-mail: [EMAI

Re: Always on Top.. TK

2003-06-27 Thread R. Joseph Newton
Voodoo Raja wrote: > Hi all.. > > Just a quick one.. > > Is it possible to force my TK application to on top of all the windows that > are present on the screen.. or rather set the window to be always visible > ... Possibly with bad [ie Win 9x] operating systems. On better operating systems ther

Re: Hmm....is a hot directory possible?

2003-06-27 Thread Harry Putnam
david <[EMAIL PROTECTED]> writes: >> This is not what the OP asked. But I wondered if one can determine >> if a file has been writen to or changed inside a directory by looking >> at a stat on the directory. > > if i am not dreaming, OP asks for whether there is new files adding to the Maybe wh

Re: Why "Global symbol require explicit package name"

2003-06-27 Thread John W. Krahn
Babale Fongo wrote: > > Hello guy! Hello, > I would like to know why I need to declare global variables with "my". So that they won't be global. Using global variables is not bad per se, however most professional programmers try to avoid using them. > My script looks something like thing: >

Re: Hmm....is a hot directory possible?

2003-06-27 Thread david
Harry Putnam wrote: > david <[EMAIL PROTECTED]> writes: > >> >> you could take a look at the stat function provided by Perl to see if the >> directory's last modified time or inode change time changed: > > This is not what the OP asked. But I wondered if one can determine > if a file has been w

Re: Why "Global symbol require explicit package name"

2003-06-27 Thread George Schlossnagle
perldoc strict look at 'use strict vars' in particular. George On Friday, June 27, 2003, at 08:51 PM, Babale Fongo wrote: Hello guy! I would like to know why I need to declare global variables with "my". My script looks something like thing: Use strict; $strg = "A string"; $strg2 = "a second

Why "Global symbol require explicit package name"

2003-06-27 Thread Babale Fongo
Hello guy! I would like to know why I need to declare global variables with "my". My script looks something like thing: Use strict; $strg = "A string"; $strg2 = "a second string"; I get a warning: "Global symbol require explicit package name." unless I declare the variables like: my $strg = "A

Re: checking OS support for flock

2003-06-27 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: I'm learning on a win98 machine and my webserver is a unix OS. win98 doesn't support flock and of course unix does. How can I code to test if the function is supported? I tried conditionals but it still throws the error. What conditionals did you try? Some common co

Re: Hmm....is a hot directory possible?

2003-06-27 Thread Wiggins d'Anconia
Gary Stainburn wrote: On Thursday 26 Jun 2003 10:38 pm, Jenda Krynicky wrote: From: Chris Zimmerman <[EMAIL PROTECTED]> Is there some way that I can write a bit of code that will watch a directory and as soon as a file is written to that directory, something is run against that file? What would

Re: Linux, Perl, [open,star]office

2003-06-27 Thread Thomas A. Lowery
I've found these modules work well for creating excel spreadsheets. Spreadsheet::ParseExcel Spreadsheet::WriteExcel I recently wrote a script that converts csv files into worksheets in a workbook. Makes it easier for a client to review their different reports. Tom On Fri, Jun 27

Always on Top.. TK

2003-06-27 Thread Voodoo Raja
Hi all.. Just a quick one.. Is it possible to force my TK application to on top of all the windows that are present on the screen.. or rather set the window to be always visible ... best regards Sam _ STOP MORE SPAM with the new M

Re: Simple question on splice

2003-06-27 Thread Rob Dixon
Sitha Nhok wrote: > Hi, if I have a multidimensional array like : > > @AoA = ( > ["ABC", "BCD"], > ["CDE", "DEF"], > ["EFG", "FGH"], > ); > > > then do: > > @var = splice @AoA, 2, 1; # to delete the last row > > print @var; #print

Re: Simple question on splice

2003-06-27 Thread Rob Dixon
Sitha Nhok wrote: > Hi, if I have a multidimensional array like : > > @AoA = ( > ["ABC", "BCD"], > ["CDE", "DEF"], > ["EFG", "FGH"], > ); > > > then do: > > @var = splice @AoA, 2, 1; # to delete the last row > > print @var; #print

RE: Socket question

2003-06-27 Thread LoBue, Mark
> -Original Message- > From: Gabor Urban [mailto:[EMAIL PROTECTED] > Sent: Friday, June 27, 2003 6:13 AM > To: [EMAIL PROTECTED] > Subject: Socket question > > > Hi, > > I am still working on a socket problem at low level, and there is > something I wander. Are Perl socket bidirectional?

Linux, Perl, [open,star]office

2003-06-27 Thread Paul Kraus
I have a windows app that reads a bunch of text files and then using Win32::OLE it inserts that data into an excel spreadsheet. Is there something similar I can do with an open office document in Linux? I am trying to switch my workstation over to all Linux but need to be able to generate the same

Re: Simple question on splice

2003-06-27 Thread Rob Anderson
"Rob Anderson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Sitha Nhok" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, if I have a multidimensional array like : > > > > @AoA = ( > > ["ABC", "BCD"], > > ["CDE", "DEF"], > >

Re: Simple question on splice

2003-06-27 Thread Rob Anderson
"Sitha Nhok" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, if I have a multidimensional array like : > > @AoA = ( > ["ABC", "BCD"], > ["CDE", "DEF"], > ["EFG", "FGH"], > ); > > > then do: > > @var = splice @AoA

RE: using whence

2003-06-27 Thread David Parker
Excellent. That explains why the pipe made it work. Thanks! - DAP > -Original Message- > From: Jeff Westman [mailto:[EMAIL PROTECTED] > Sent: Friday, June 27, 2003 11:04 AM > To: beginners > Subject: Re: using whence > > > > David Parker wrote: > > > Hi. I have a perl script that calls

Re: using whence

2003-06-27 Thread Jeff Westman
> David Parker wrote: > > Hi. I have a perl script that calls various programs. I would like to be > able to verify that a given program is being called from the right place - > what I would use "whence" for in the korn shell. > > > > I tried > > > >$path = `whence $cmdname`; > > > > but I

Re: perl help ftp

2003-06-27 Thread Kevin Pfeiffer
Hi, In article <[EMAIL PROTECTED]>, Vemulakonda Uday Bhaskar wrote: > hi all > > can anyone tell me from where i can download Net::FTP from > www.cpan.org > > with regards > uday bhaskar (Your messages are being sent twice for some reason) After you've found the module, near the top of the p

RE: help perl ftp

2003-06-27 Thread Aman Thind
when you see the outcome of your search for Net::FTP on search.cpan.org you see something like : Net::FTP FTP Client Class perl-5.8.0 - Date - author Net::FTP FTP Client Class libnet-1.16 - Date - author DON'T click on Net::FTP, that is where you're finding the **theorotical explanation** click

Re: Count Function?

2003-06-27 Thread Kevin Pfeiffer
Hi Paul, In article <[EMAIL PROTECTED]>, Paul Johnson wrote: > > Kevin Pfeiffer said: [...] >> But what I can't figure out (and have tried several variants) is how to >> get the count when using a variable (ala' from inside an eval). This is >> the closet I got: >> >> my $sentence = "Here is my

Simple question on splice

2003-06-27 Thread Sitha Nhok
Hi, if I have a multidimensional array like : @AoA = ( ["ABC", "BCD"], ["CDE", "DEF"], ["EFG", "FGH"], ); then do: @var = splice @AoA, 2, 1; # to delete the last row print @var; #print what was returned from splice

checking OS support for flock

2003-06-27 Thread Motherofperls
I'm learning on a win98 machine and my webserver is a unix OS. win98 doesn't support flock and of course unix does. How can I code to test if the function is supported? I tried conditionals but it still throws the error.

Re: Count Function?

2003-06-27 Thread Paul Johnson
Kevin Pfeiffer said: > Thanks to Sudarshan & Janek! > > I found this as suggested... > > # NOTE: (from perlop) > # Because the transliteration table is built at com­ > # pile time, neither the SEARCHLIST nor the REPLACE­ > # MENTLIST are subjected to double quote interpola­ > # tion. That means

RE: help perl ftp

2003-06-27 Thread Darbesio Eugenio
-Original Message- ... >>>thoughi searched http://search.cpan.org/, i couldnot get the >>>p[lace from where i can download NEt::FTP. I on;y got is a >>>theorotical explanation of Net::FTP ... Try http://search.cpan.org/, then search for Net::FTP, choice the second one in the list, clic

Re: Count Function?

2003-06-27 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Sudarshan Raghavan wrote: > Nelson Ray wrote: > >>Does anyone know of any sort of a function or method in perl that returns >>the number of times a search string exists in a scalar. Say, how many >>"a's" >>are there in this sentence? I am able to write it myself

Socket question

2003-06-27 Thread Gabor Urban
Hi, I am still working on a socket problem at low level, and there is something I wander. Are Perl socket bidirectional? I am currently work to test an Apache module, that processes HTTP POST requests. I thought at the beginning, that a Perl script would do perfect for me. Code fragment: sen

help perl ftp

2003-06-27 Thread vemulakonda uday bhaskar
Hi AALL thoughi searched http://search.cpan.org/, i couldnot get the p[lace from where i can download NEt::FTP. I on;y got is a theorotical explanation of Net::FTP please help me in this regads with regards uday bhaskar ___ Click below to experie

RE: perl help ftp

2003-06-27 Thread Darbesio Eugenio
-Original Message- vemulakonda uday bhaskar wrote: ... >>>can anyone tell me from where i can download Net::FTP from >>> www.cpan.org ... Browse to http://search.cpan.org/ then search for Net::FTP. E. CONFIDENTIALIT

RE: using whence

2003-06-27 Thread David Parker
As it happens, on my platform (z/OS UNIX), the "sh" actually IS a form of korn shell (it was ported to the mainframe by MKS, apparently), so there is a 'whence'. What's weird is that doing something like $path = `whence $cmd | uniq` actually works, though the pipe to uniq is pointless. Somethi

perl help ftp

2003-06-27 Thread vemulakonda uday bhaskar
hi all can anyone tell me from where i can download Net::FTP from www.cpan.org with regards uday bhaskar ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan & Kareena K

perl help ftp

2003-06-27 Thread vemulakonda uday bhaskar
hi all can anyone tell me from where i can download Net::FTP from www.cpan.org with regards uday bhaskar ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan & Kareena K

Help Net::FTP download

2003-06-27 Thread vemulakonda uday bhaskar
Hi All i searched for Net::FTP in http://search.cpan.org, but i could not find anyplace from where i can download it.i can got o that page where there is explanation about Net::FTP, but no where could i find the dowmload site could u help me in this regards With Regards V.V. uday Bhaskar __

Help Net::FTP download

2003-06-27 Thread vemulakonda uday bhaskar
Hi All i searched for Net::FTP in http://search.cpan.org, but i could not find anyplace from where i can download it.i can got o that page where there is explanation about Net::FTP, but no where could i find the dowmload site could u help me in this regards With Regards V.V. uday Bhaskar __

RE: IPC with parent from mutiple children

2003-06-27 Thread Lodewijks, Jeroen
I think I have found the problem. It turns out that the closing and opening of the pipe is in the wrong place. This code actually works: #!/bin/env perl # use strict; use FileHandle; # Global variables; my $child = 0; my $max_child = 60; # --- Sub routines

Re: it seems impossible to me...

2003-06-27 Thread Gabor Urban
If you use Unix type of system, there a full shell solution: - print your array to a text file - sort the file with the unix command 'sort' - remove the multiple lines with the unix command 'uniq' You may find the details in the man Gabaux Linux is like a wigwam: no gates, no windows, and an

help perl+ftp

2003-06-27 Thread vemulakonda uday bhaskar
Dear all From where i can download Net::FTP module to install it in my system With Regards V.V. Uday Bhaskar ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan & Kar

it seems impossible to me...

2003-06-27 Thread Adriano Allora
Hi to all, I have to clean a huge array in wich every element is a text line. My cleaning consists in deleting each item if it appears more than one time. I cannot use hashes and I'd prefer avoiding foreach cycles (I have a lot of arrays, and so...). I searched a function wich works in this

Re: Help : Net::FTP

2003-06-27 Thread Sudarshan Raghavan
vemulakonda uday bhaskar wrote: Dear all Can u give me a site from where i can download and install "Net::FTP" For all you perl module download needs, go here http://search.cpan.org Please bookmark it. Regards uday bhaskar.v.v. ___ Click bel

Help : Net::FTP

2003-06-27 Thread vemulakonda uday bhaskar
Dear all Can u give me a site from where i can download and install "Net::FTP" Regards uday bhaskar.v.v. ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan & Kareena

Help : Net::FTP

2003-06-27 Thread vemulakonda uday bhaskar
Dear all Can u give me a site from where i can download and install "Net::FTP" Regards uday bhaskar.v.v. ___ Click below to experience Sooraj Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan, Abhishek Bachchan & Kareena

RE: linefeed

2003-06-27 Thread Charles Scheepers
The problem is that these characters are added when printing the output to file. Even if I remove these with chomp or chop they will be added again when I write the data to file. Regards, Charles Scheepers Pr.Eng. [EMAIL PROTECTED] (011) 324-9026 (084) 511-6164 -Original Message-

Re: HELP! Reg-ex question

2003-06-27 Thread Sudarshan Raghavan
Mike wrote: Given the following code snippet: - print "$text\n"; my $text="sour red apples"; my $pattern="(sour)"; my $replacement="very \$1"; $text=~s/$pattern/$replacement/; print "$text\n"; - I was expecting "very sour red appl

Converting/executing a PERL script in binaries

2003-06-27 Thread Leaw, Chern Jian
HI, I'm wanting to execute my PERL script in a binary/executable form. I wrote a C wrapper to do so. However, when executing the binary code produced by the wrapper, it produced the warning message as attached the file WRAPPER-OUTPUT.txt. However, when executing just the script itself, the script

Re: Count Function?

2003-06-27 Thread Janek Schleicher
Nelson Ray wrote at Thu, 26 Jun 2003 19:25:37 -0700: > Does anyone know of any sort of a function or method in perl that returns > the number of times a search string exists in a scalar. Say, how many "a's" > are there in this sentence? I am able to write it myself, but I was > wondering if Perl

Re: Count Function?

2003-06-27 Thread Sudarshan Raghavan
Nelson Ray wrote: Does anyone know of any sort of a function or method in perl that returns the number of times a search string exists in a scalar. Say, how many "a's" are there in this sentence? I am able to write it myself, but I was wondering if Perl had an inherent function for cleaner opera

Problem with cgi

2003-06-27 Thread beginner beginner
Hi All, Seems to be OT but still thought you guys can help me I have an html page If I click submit I calls cgi script and executes that but in my Case Windows XP It is just opening that script. and not executig that. Could you please suggest how to solve this problem Thanks, Amit __

RE: HELP! Reg-ex question

2003-06-27 Thread Tim Johnson
I can't test this out here, but I think the e after the regex makes the right side get evaluated as code, so maybe you need to put quotes around the right-hand side of your regex: $text=~s/$pattern/"$replacement"/e; -Original Message- From: Mike To: [EMAIL PROTECTED] Sent: 6/26/03 12:

Re: Hmm....is a hot directory possible?

2003-06-27 Thread Gary Stainburn
On Thursday 26 Jun 2003 10:38 pm, Jenda Krynicky wrote: > From: Chris Zimmerman <[EMAIL PROTECTED]> > > > Is there some way that I can write a bit of code that will watch a > > directory and as soon as a file is written to that directory, > > something is run against that file? What would be the

Count Function?

2003-06-27 Thread Nelson Ray
Does anyone know of any sort of a function or method in perl that returns the number of times a search string exists in a scalar. Say, how many "a's" are there in this sentence? I am able to write it myself, but I was wondering if Perl had an inherent function for cleaner operation. I tried look

Re: using whence

2003-06-27 Thread Brandon Willis
`$cmd` or it identical twin qx($cmd) both shell out and actually do an sh -c. So if you are looking for something specifically in ksh you'll have to run ksh from within the qx(). |b On Thu, 2003-06-26 at 16:21, David Parker wrote: > Hi. I have a perl script that calls various programs. I would li

HELP! Reg-ex question

2003-06-27 Thread Mike
Given the following code snippet: - print "$text\n"; my $text="sour red apples"; my $pattern="(sour)"; my $replacement="very \$1"; $text=~s/$pattern/$replacement/; print "$text\n"; - I was expecting "very sour red apples" to be pr

How can i make this faster?

2003-06-27 Thread magelord
hi, i wrote this little program. it reads a file and puts the output into a treelike structure. the content of the file is the output of the du command. something like that: 124k /var/backups/dpkg.status.3.gz 12k /var/log/auth.log.1.gz 12k /var/log/daemon.log.1.gz 12k /var/log/debug.1.gz 12k /var/

Re: help me perl : sftp

2003-06-27 Thread Casey West
It was Friday, June 27, 2003 when vemulakonda uday bhaskar took the soap box, saying: : dear all : : i have a code to tranfer file between two linux machines using : sftp : : for that i used "use Net::SFTP", but it is giving error saying : "Can't locate Net.SFTP.pm [EMAIL PROTECTED] : (@INC con