Equivalent of GetVersionInfo ()

2003-09-05 Thread Shishir Saxena
Hi, Is there a way to get the information returned by the VC++ fn GetVersionInfo( ); thru any of the perl structures / commands ? PS : If this is too easy a question...plz pardon my ignorance but I'm really new to perl ! Regards, Shishir Saxena --

RE: Equivalent of GetVersionInfo ()

2003-09-05 Thread Charles K. Clarkson
Shishir Saxena <[EMAIL PROTECTED]> wrote: : Is there a way to get the information returned by the VC++ fn : GetVersionInfo(); thru any of the perl structures / commands? What does GetVersionInfo() return? Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Sp

RE: Equivalent of GetVersionInfo ()

2003-09-05 Thread Shishir Saxena
Hi, It reads the resource of the file on which the function is used on and it returns a collective string that has everything that is part of the resource like, copyright info, build number (if a components or executable), date of creation etc. I intend to then creat a log of that information.

split large array into chunks

2003-09-05 Thread Ramprasad A Padmanabhan
Hello all, Suppose I have a huge array of filenames and I want to move them I would like to move 1 chunk at a time on 'n' elements How Can I efficiently do it ? something like @allfiles = () # 1 files @smallchunks = split_to_chunks(@allfiles,100); # This functi

REPOST - print ;

2003-09-05 Thread Edward Yang
I'm not sure if this is a bug. I'm running Perl 5.8 on a Windows 2000 Pro system (with SP4 and all latest hotfixes installed). Running perl -v I get: This is perl, v5.8.0 built for MSWin32-x86-multi-thread ~~ The problem is I do not get correct result from the following code: print

how to decode encoded characters

2003-09-05 Thread Ramprasad A Padmanabhan
Hi all, When I use Mail::IMAPClient I am getting charachters encoded in the following way =?iso-8859-1?q?EDM= How Can I decode them Ram -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

reset a file pointer

2003-09-05 Thread Sachin Mathur
Hi , I am a beginner in perl I would like to know how to reset a file pointer in perl. Is their a rewind command in perl Sachin

Re: reset a file pointer

2003-09-05 Thread Paul Johnson
Sachin Mathur said: > Hi , > I am a beginner in perl I would like to know how to reset a file > pointer in perl. Is their a rewind command in perl No. Use seek() perldoc -f seek -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: reset a file pointer

2003-09-05 Thread Tassilo von Parseval
On Fri, Sep 05, 2003 at 03:25:46PM +0530 Sachin Mathur wrote: > Hi , > I am a beginner in perl I would like to know how to reset a file > pointer in perl. Is their a rewind command in perl Yes, it's called seek(): use Fcntl qw/:seek/; seek FILE, 0, SEEK_SET; The first line is only for

perl questions / exercices

2003-09-05 Thread Ged
Hi all, I am currently learning perl reading all the material I can get my hands on, but have no use for it on a daily basis. Because of this I am not getting the practice I need on a day-to-day basis to gain more knowledge. Having covered all the questions in books like 'Learning Perl' etc I

RE: perl questions / exercices

2003-09-05 Thread Shishir Saxena
Well since you've asked for it how about doing this, I want to make a cross-platform utility that when provided with the location of a directory structure generates the following log, 1) Date of creation 2) Size on Disk 3) Build number of the component / executable. 4) Copyright info (if included

Perl on the web?

2003-09-05 Thread Dawn Bradshaw
Hi! Does anyone have experience with making a perl script run on the web? Specifically, I'm having trouble collecting the answers the users give on the web page and incorporating them into the script. The script itself runs fine on the web server. Any suggestions, advice or help would be greatl

Re: split large array into chunks

2003-09-05 Thread Jenda Krynicky
From: Ramprasad A Padmanabhan <[EMAIL PROTECTED]> > Suppose I have a huge array of filenames and I want to move them I > would like to move 1 chunk at a time on 'n' elements > > How Can I efficiently do it ? > > something like > > @allfiles = () # 1 files > @smallchunks = split_to_

Re: Perl on the web?

2003-09-05 Thread rjtaylor
Quite the open-ended question there, my dear. What you're looking for is a way to receive data through a web server, most likely Apache (the most commonly used web server, but any would do), and manipulate it and then send it out through the web server to the requesting/submitting web browser, rig

Re: RE: perl questions / exercices

2003-09-05 Thread Ged
Sounds interesting. I'll give it a whirl. Hope you won't be waiting for me to code it though as it might take me a while to get it running smoothly, esspeically with it being cross platform. > > From: Shishir Saxena <[EMAIL PROTECTED]> > Date: 2003/09/05 Fri AM 10:33:56 GMT > To: Ged <[EMAIL PR

case conversion problem

2003-09-05 Thread Gary Stainburn
Hi folks, I've got a problem I hope you can help me with. I've got to tidy some data, including converting case. I need to convert ANOTHER COMPANY NAME LTD ** to Another Company Name Ltd ** while retaining spaces. I've tried using split / join / lc / ucfirst which does most of the

please help !! pattern match

2003-09-05 Thread Pandey Rajeev-A19514
Hi , I need some help me to extract a pattern. The delimiters is a pair of "abcd" and "efgh". Can some one help me with an efficient use of Greedy and non greedy matches, look ahead and lookbehind features. I want the smallest match involving the two delimiters. I want all the matches. i.e. f

Re: case conversion problem

2003-09-05 Thread James Edward Gray II
On Friday, September 5, 2003, at 08:14 AM, Gary Stainburn wrote: Hi folks, I've got a problem I hope you can help me with. I've got to tidy some data, including converting case. I need to convert ANOTHER COMPANY NAME LTD ** to Another Company Name Ltd ** while retaining spaces.

Perl script checks for a file

2003-09-05 Thread Anthony J Segelhorst
Does anyone already have a perl script that checks to see if a file exists or not a Windows Platform? Anthony J Segelhorst Enterprise Systems Management Team Phone: 937-495-1876 Email: [EMAIL PROTECTED] This email has been

Re: case conversion problem

2003-09-05 Thread Jenda Krynicky
From: Gary Stainburn <[EMAIL PROTECTED]> > I've got to tidy some data, including converting case. I need to > convert > > ANOTHER COMPANY NAME LTD ** > > to > > Another Company Name Ltd ** > > while retaining spaces. $text =~ s/(\w+)/\L\u$1/g;$y Jenda = [EMAIL PROTECTED] === ht

Re: case conversion problem

2003-09-05 Thread Paul Johnson
Gary Stainburn said: > Hi folks, > > I've got a problem I hope you can help me with. > > I've got to tidy some data, including converting case. I need to convert > > ANOTHER COMPANY NAME LTD ** > > to > > Another Company Name Ltd ** > > while retaining spaces. > > I've tried using split

Undef hash

2003-09-05 Thread Paul Kraus
How can I kill a hash? I don't want to kill the entire hash just one element. $hash{key}=value <- I just want to remove this one not all of %hash. Paul Kraus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Undef hash

2003-09-05 Thread Marcos . Rebelo
delete($hash{key}) -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 3:29 PM To: [EMAIL PROTECTED] Subject: Undef hash How can I kill a hash? I don't want to kill the entire hash just one element. $hash{key}=value <- I just want to remove thi

Re: case conversion problem

2003-09-05 Thread Gary Stainburn
On Friday 05 Sep 2003 2:25 pm, Jenda Krynicky wrote: > From: Gary Stainburn <[EMAIL PROTECTED]> > > > I've got to tidy some data, including converting case. I need to > > convert > > > > ANOTHER COMPANY NAME LTD ** > > > > to > > > > Another Company Name Ltd ** > > > > while retaining sp

Re: case conversion problem

2003-09-05 Thread Paul Johnson
Jenda Krynicky said: > From: Gary Stainburn <[EMAIL PROTECTED]> >> I've got to tidy some data, including converting case. I need to >> convert >> >> ANOTHER COMPANY NAME LTD ** >> >> to >> >> Another Company Name Ltd ** >> >> while retaining spaces. > > $text =~ s/(\w+)/\L\u$1/g;$y \L\

Re: case conversion problem

2003-09-05 Thread James Edward Gray II
On Friday, September 5, 2003, at 08:52 AM, Gary Stainburn wrote: On Friday 05 Sep 2003 2:25 pm, Jenda Krynicky wrote: From: Gary Stainburn <[EMAIL PROTECTED]> I've got to tidy some data, including converting case. I need to convert ANOTHER COMPANY NAME LTD ** to Another Company Name Ltd

Find the name of all the function on the system

2003-09-05 Thread Marcos . Rebelo
I need to do some kind of generic log trow my code, this will be used just in debug mode. I has sinking something like. sub prepareLog{ foreach my $functionName (xpto()) { next if not toLog($functionName); *$functionName = sub { pri

Re: Perl script checks for a file

2003-09-05 Thread Rob Anderson
"Anthony J Segelhorst" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anyone already have a perl script that checks to see if a file exists > or not a Windows Platform? > if (-e $filename) {print "There it is\n"} > > Anthony J Segelhorst > Enterprise Systems Management Team >

Re: please help !! pattern match

2003-09-05 Thread Rob Anderson
"Pandey Rajeev-A19514" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi , Hello > > I need some help me to extract a pattern. The delimiters is a pair of "abcd" and "efgh". Can some one help me with an efficient use of Greedy and non greedy matches, look ahead and lookbehind feat

Modifying a file in place perl -i

2003-09-05 Thread Raj (Basavaraj) Karadakal
Hi, I am trying to modify some file sin place usinh the -i switch of perl. In each of the files however I need to replace certain strings with file name it self. When I try the following command perl -i.orig -pe 's//$0/' `ls -1` Will replace '' with '-e' in all the files How can I get th

Re: Modifying a file in place perl -i

2003-09-05 Thread Paul Johnson
Raj (Basavaraj) Karadakal said: > Hi, > I am trying to modify some file sin place usinh the -i switch of > perl. In each of the files however I need to replace certain strings with > file name it self. > > When I try the following command > perl -i.orig -pe 's//$0/' `ls -1` > > Will replace

Re: split large array into chunks

2003-09-05 Thread Randal L. Schwartz
> "Ramprasad" == Ramprasad A Padmanabhan <[EMAIL PROTECTED]> writes: Ramprasad> Hello all, Ramprasad> Suppose I have a huge array of filenames and I want to move them Ramprasad> I would like to move 1 chunk at a time on 'n' elements Ramprasad> How Can I efficiently do it ? Ramprasad> some

Re: Find the name of all the function on the system

2003-09-05 Thread Randal L. Schwartz
> "Marcos" == Marcos Rebelo <[EMAIL PROTECTED]> writes: Marcos> I need to do some kind of generic log trow my code, this will Marcos> be used just in debug mode. First, you might just consider running your code under the debugger. You can make a custom debugger hook that traces exactly what y

Re: Modifying a file in place perl -i

2003-09-05 Thread Randal L. Schwartz
> "Raj" == Raj Karadakal <[EMAIL PROTECTED]> writes: Raj> Hi, Raj>I am trying to modify some file sin place usinh the -i switch of Raj> perl. In each of the files however I need to replace certain strings with Raj> file name it self. Raj> When I try the following command Raj> perl -i.orig

Re: perl questions / exercices

2003-09-05 Thread Randal L. Schwartz
> "Shishir" == Shishir Saxena <[EMAIL PROTECTED]> writes: Shishir> I want to make a cross-platform utility that when provided Shishir> with the location of a directory structure generates the Shishir> following log, Shishir> 1) Date of creation Not possible in Unix. -- Randal L. Schwartz

Re: cutting a string

2003-09-05 Thread denis
On Thu, 4 Sep 2003 [EMAIL PROTECTED] wrote: > basename is more convenient i think. What do you say? > Only if you can load the module on the system. running into issues here at work where I can load modules (security llama's) Denis > > Quoting [EMAIL PROTECTED]: > > > On Mon, 1 Sep 2003 [EMA

Re: split large array into chunks

2003-09-05 Thread John W. Krahn
Ramprasad A Padmanabhan wrote: > > Hello all, Hello, > Suppose I have a huge array of filenames and I want to move them > I would like to move 1 chunk at a time on 'n' elements > > How Can I efficiently do it ? > > something like > > @allfiles = () # 1 files > @smallchunks = spl

Re: cutting a string

2003-09-05 Thread denis
Sorry, lack of sleep.. but isn't File::Basename usally installed in the standard Perl install? Denis On Fri, 5 Sep 2003 [EMAIL PROTECTED] wrote: > On Thu, 4 Sep 2003 [EMAIL PROTECTED] wrote: > > > basename is more convenient i think. What do you say? > > > Only if you can load the module on t

Re: cutting a string

2003-09-05 Thread John
Then we have to install it. However, in activestate's distribution there is the specific modul preinstalled. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Perl Beginners" <[EMAIL PROTECTED]> Sent: Friday, September 05, 2003 7:33 PM Subject: Re: cutting a stri

re: case conversion problem

2003-09-05 Thread JOHN FISHER
I am trying to figure out how clever it actually is. I reversed \L\u with \u\L expecting different results and got the same result. Another Company Name Ltd Why didn't reversing the metacharacters change the results. the \L escape forces lowercase When written in lowercase (\l and \u), they affec

Bivariate Normal CDF

2003-09-05 Thread Samantha Cook
Hi, Does anyone have code, or are there modules out there, for calculating probabilities for the bivariate normal distribution? thanks, sam cook -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

telnet and then run any one command on windows

2003-09-05 Thread Nitin Aggarwal
Hi , case 1: my $hostname = '10.10.2.45'; my $prompt1 = '/\>$/'; my $name = 'administrator'; my $password = 'nn'; my $string = 'net start '; my $session1 = Net::Telnet->new(Host => $hostname,) ; $session1->login(Name => $name, Password => $password, Prompt => $prompt1,); my @output = $session1->

RE: Bivariate Normal CDF

2003-09-05 Thread wiggins
On Fri, 5 Sep 2003 14:47:31 -0400 (EDT), Samantha Cook <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone have code, or are there modules out there, for calculating > probabilities for the bivariate normal distribution? > Well a very quick look,

Do not understand Hashes !

2003-09-05 Thread Larry Sandwick
I have a problem with hashes and trying to understand them, I have read the perldoc intersection and looked into the Perl Cookbook, and still do not understand how I should handle this problem. I have a master file with part number and quantity in it. I also have a file that has the same infor

re: case conversion problem

2003-09-05 Thread david
John Fisher wrote: > I am trying to figure out how clever it actually is. > I reversed \L\u with \u\L expecting different results and got the same > result. Another Company Name Ltd > > Why didn't reversing the metacharacters change the results. > [snip] > > $pt=~s/(\w+)/\u\L$1/g > > $pt=~s/

Re: Do not understand Hashes !

2003-09-05 Thread Matt Matijevich
I am only a Perl beginner myself (there is probably much better ways to do this) but I put this together, I did not use the $ARGV array but that should be easy to change, I also manually deleted blank lines and spaces from the input files so you might want to check for those when you are looping th

Re: Do not understand Hashes !

2003-09-05 Thread James Edward Gray II
On Friday, September 5, 2003, at 02:07 PM, Larry Sandwick wrote: I have a problem with hashes and trying to understand them, I have read the perldoc intersection and looked into the Perl Cookbook, and still do not understand how I should handle this problem. I have a master file with part numbe

Re: Do not understand Hashes !

2003-09-05 Thread John W. Krahn
Larry Sandwick wrote: > > I have a problem with hashes and trying to understand them, I have read > the perldoc intersection and looked into the Perl Cookbook, and still do > not understand how I should handle this problem. perldoc perldata > I have a master file with part number and quantity i

Re: Do not understand Hashes !

2003-09-05 Thread John W. Krahn
"John W. Krahn" wrote: > > I would read the data file first and then modify the master file: > > my $fname = shift || 'scanned.file'; > > open DATA, $fname or die "Could not open $fname: $!"; > my %data = map /^([^,]+),\s*(\d+)/, Should be a semicolon at the end. my %data = map /^([^,]+),\s*(

Does anyone gets duplicated copies of a message all the time?!

2003-09-05 Thread Wong, Nelson
Hi all, I always get three identical copies of a message all the time, therefore, I just wonder if anyone has the same situation as mine! Thanks! BTW, it is a great ML!!! Happy knowledge sharing! Nelson

Re: case conversion problem

2003-09-05 Thread Paul Johnson
On Fri, Sep 05, 2003 at 12:29:31PM -0700, david wrote: > John Fisher wrote: > > > I am trying to figure out how clever it actually is. > > I reversed \L\u with \u\L expecting different results and got the same > > result. Another Company Name Ltd > > > > Why didn't reversing the metacharacters c

Re: REPOST - print ;

2003-09-05 Thread Robert Citek
Hello Edward, At 05:07 PM 9/5/2003 +0800, Edward Yang wrote: >The problem is I do not get correct result from the following code: >print ; >or >print ; I don't use perl in Windows, but I can simulate a similar result on Linux or Mac OS X: mkdir "foo bar" cd "foo bar" touch a b c cd ..

RE: REPOST - print ;

2003-09-05 Thread Hanson, Rob
Windows is a little weird here because of the way long filenames are supported. You need to use the short name of the directory, which is the first 6 letters - a tilda - and a number (always 1, unless there multiple files with the same first 6 chars). This works for me: print ; Rob -Origina

RE: REPOST - print ;

2003-09-05 Thread Hanson, Rob
This also works and is more portable... my $dir = 'C:/Program Files'; opendir DIR, $dir; print map {"$dir/$_"} grep {/.+\..+/} readdir(DIR); closedir DIR; Rob -Original Message- From: Hanson, Rob Sent: Friday, September 05, 2003 8:38 PM To: [EMAIL PROTECTED] Subject: RE: REPOST - print

Re: REPOST - print ;

2003-09-05 Thread Bob Showalter
Edward Yang wrote: > I'm not sure if this is a bug. > > I'm running Perl 5.8 on a Windows 2000 Pro system (with SP4 and all > latest hotfixes installed). > > Running perl -v I get: > This is perl, v5.8.0 built for MSWin32-x86-multi-thread > > ~~ > > The problem is I do not get correct

Re: case conversion problem

2003-09-05 Thread David Wall
--On Friday, September 05, 2003 2:14 PM +0100 Gary Stainburn <[EMAIL PROTECTED]> wrote: I've got to tidy some data, including converting case. I need to convert ANOTHER COMPANY NAME LTD ** to Another Company Name Ltd ** while retaining spaces. I've tried using split / join / lc

html 2 text

2003-09-05 Thread Ramprasad A Padmanabhan
Is there a module to convert html to text -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: passing an argument to a subroutine

2003-09-05 Thread Todd W.
"B. Fongo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello > > An argument passed to a subroutine returns wrong value. > > Code example: > > @x = (1..5); > $x = @x; > here, $x gets the number of elements in @x > > showValue ($x); # or showValue (\$x); > > > sub showValue {