scope of the variable?

2006-02-02 Thread bogum
Hello All, I have following question regarding accessing variable from other module: In test.pm I have following: #BEGIN OF THE TEST.PM package test; use strict; use warnings; # # The object responsible for managing the database connections. # my $dbaccess = undef; -somewhere else $dbaccess =

RE: extracting information from a file

2006-02-02 Thread Dhanashri Bhate
Hi, Give the sample data and then only one can tell what kind of regex you need. If your data is simple, just fields delimited by ">" you don't need to write regex, you can just work with "split". Read the data lines one by one, and for each line use split to get the fields in an array. Also rememb

extracting information from a file

2006-02-02 Thread Rana
Hi, I am a new bee to perl and I am trying to extract data present between delimiter ">". I am not exactly sure how to write the regular expression so that I can assign the extracted information to a string or an array. Kindly help me in this regard. Thank you. Rana

about the TIME_WAIT

2006-02-02 Thread Sophie Joe
hi,here, When the socket clients connect to the server,there are many TIME_WAIT messages appearing in clients's tcp connection status as following: $ netstat -an tcp0 0 192.168.0.130:50124 192.168.0.10:31330TIME_WAIT tcp0 0 192.168.0.130:50125 192.168.0.10:3133

Re: vlookup by perl instead of excel

2006-02-02 Thread Hal
On Thu, 2006-02-02 at 16:52 -0800, Sanjay Chandriani wrote: > Hi, > > Ok, so I see my question was unclearly posed. Here's what I want to do: > > I have two tab-delimited text files. > > File one: > column 1: UNIQUE identifiers (about 40,000), one identifier per line. > column 2: some desc

Re: question regarding reference of a local variable

2006-02-02 Thread Chas Owens
On 2/2/06, Pine Yan <[EMAIL PROTECTED]> wrote: > > Hi, what happens to the memory space with the following code: > > my @full_list = (); > > if (...) { > my @tmp_list; > @tmp_list = split(...); > @full_list = (@full_list, [EMAIL PROTECTED]); > } > > > Here @tmp_list is a local variable and it

question regarding reference of a local variable

2006-02-02 Thread Pine Yan
Hi, what happens to the memory space with the following code: my @full_list = (); if (...) { my @tmp_list; @tmp_list = split(...); @full_list = (@full_list, [EMAIL PROTECTED]); } Here @tmp_list is a local variable and its definition terminates at the end of this code segment. Does this m

Re: vlookup by perl instead of excel

2006-02-02 Thread Sanjay Chandriani
Hi, Ok, so I see my question was unclearly posed. Here's what I want to do: I have two tab-delimited text files. File one: column 1: UNIQUE identifiers (about 40,000), one identifier per line. column 2: some description of the identifier (let's say, red, green or blue). For example,

Re: vlookup by perl instead of excel

2006-02-02 Thread Chris Devers
On Thu, 2 Feb 2006, Sanjay Chandriani wrote: > I am a perl newbie, so pardon my question if it is super easy. I used > to routinely use Microsoft excel to do my vlookup's on a PC. > Recently, I got a new Apple computer and the vlookup function on Mac's > excel is unbearably slow. I often do

vlookup by perl instead of excel

2006-02-02 Thread Sanjay Chandriani
Hi, I am a perl newbie, so pardon my question if it is super easy. I used to routinely use Microsoft excel to do my vlookup's on a PC. Recently, I got a new Apple computer and the vlookup function on Mac's excel is unbearably slow. I often do vlookup's for a column of identifiers that is 40K lo

RE: Sorting a hash of hashes

2006-02-02 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Scott Palmer wrote: > I am attempting to sort by a field in a hash within a hash and I am > having a hard time finding the right direction. I want the print out > to sort from smallest to largest in size. Any help would be greatly > appreciated. > > Scott > > -

Sorting a hash of hashes

2006-02-02 Thread Scott Palmer
I am attempting to sort by a field in a hash within a hash and I am having a hard time finding the right direction. I want the print out to sort from smallest to largest in size. Any help would be greatly appreciated. Scott -- #!/usr/bin/perl # Set your s

RE: Script's command-line options under Windows

2006-02-02 Thread Bakken, Luke
Daniel Kasak wrote: > Timothy Johnson wrote: >> It sounds like there is a problem with your file association. >> >> Open HKEY_CLASSES_ROOT and go to Perl-->Shell-->Open-->Command. >> >> The (Default) entry should probably read: >> >> "C:\Perl\bin\perl.exe" "%1" %* >> > I'll check it out tomorro

Re: Closing and Re-Opening the Same File Problem

2006-02-02 Thread Tom Phoenix
On 2/2/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Apparently, the statement "@Row = split(/\s+/, $TheRec);" is not > recognizing the blanks between the fields in the input record. Are they > something > other than blanks? That's a good question to ask the debugger. The 'x' command in

Re: Closing and Re-Opening the Same File Problem

2006-02-02 Thread John Doe
[EMAIL PROTECTED] am Donnerstag, 2. Februar 2006 19.35: > Here's my problem: > > I am writing a program that opens one file (pricedata.csv) as input, does > some processing, and opens a new file (PriceDataRfrmtd1.txt) for ouput. > Subsequently I close both files. So far so good. Now, within th

Closing and Re-Opening the Same File Problem

2006-02-02 Thread Sanbuah
Here's my problem: I am writing a program that opens one file (pricedata.csv) as input, does some processing, and opens a new file (PriceDataRfrmtd1.txt) for ouput. Subsequently I close both files. So far so good. Now, within the same program, I attempt to re-open the previous output (

Re: how to share variable across multi-processes

2006-02-02 Thread Jay Savage
On 1/31/06, zentara <[EMAIL PROTECTED]> wrote: > > >Since the actions of 'fork' and 'tie' happen so frequently,is there any > >performance drawback to the program?thanks again. > > Well, in reality, probably no one reading this list knows for sure. > Set up your script and run it, and see if it se

Re: How to compare hashes to find matching keys with conflicting values.

2006-02-02 Thread John Doe
Angus am Donnerstag, 2. Februar 2006 10.14: > John, Hello Angus > Well that works perfect now my issue is to understand what you have > provided for me. I see that we are creating an array called res however I > am not sure what map is doing. I did read the perldoc info on map but I am > still

RE: How to compare hashes to find matching keys with conflicting values.

2006-02-02 Thread Angus
John, Well that works perfect now my issue is to understand what you have provided for me. I see that we are creating an array called res however I am not sure what map is doing. I did read the perldoc info on map but I am still confused on how it is being used here. I see from the perldoc that