Perl threads

2011-11-05 Thread Sharan Basappa
Hello, We are in the process of writing a perl program that can send network traffic on the native pc network port. Essentially, the perl program emulates as if different traffic type sources are sending the traffic data. For this, our plan is to have a independent thread to emulate each traffic

dereferencing hash arrays

2010-08-19 Thread Sharan Basappa
Hello, Assuming I have reference to an hash array $rHash, what would be the way to dereference it. Would it be: %hashEntry = %{$rHash}; ? Regards, Sharan -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: dereferencing hash arrays

2010-08-19 Thread Sharan Basappa
wow! My impending question about usage of - also got answered ... On Thu, Aug 19, 2010 at 5:59 PM, Chas. Owens chas.ow...@gmail.com wrote: On Thu, Aug 19, 2010 at 07:51, Sharan Basappa sharan.basa...@gmail.com wrote: Hello, Assuming I have reference to an hash array $rHash, what would

add newline

2010-08-03 Thread Sharan Basappa
In my program, I am building a text file f that also contains newlines irst into an array. I push every line to the array, but how do I add new lines to this text? Regards, Sharan -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

Re: add newline

2010-08-03 Thread Sharan Basappa
Thanks a lot, Rob ... On Tue, Aug 3, 2010 at 4:13 PM, Rob Coops rco...@gmail.com wrote: On Tue, Aug 3, 2010 at 12:26 PM, Sharan Basappa sharan.basa...@gmail.com wrote: In my program, I am building a text file f that also contains newlines irst into an array. I push every line to the array

has and non unique keys

2010-08-02 Thread Sharan Basappa
Folks, Is there any restriction that the keys in perl should be unique? If not, are there any special considerations that need to be kept in mind while accessing the elements? Regards, Sharan -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail:

Re: has and non unique keys

2010-08-02 Thread Sharan Basappa
, Sharan On Mon, Aug 2, 2010 at 3:36 PM, Uri Guttman u...@stemsystems.com wrote: SB == Sharan Basappa sharan.basa...@gmail.com writes:  SB Is there any restriction that the keys in perl should be unique?  SB If not, are there any special considerations that need to be kept  SB in mind while

Re: has and non unique keys

2010-08-02 Thread Sharan Basappa
://www.cplusplus.com/reference/stl/multimap/ Regards, Sharan On Mon, Aug 2, 2010 at 4:18 PM, Shlomi Fish shlo...@iglu.org.il wrote: Hi Sharan, On Monday 02 August 2010 13:13:19 Sharan Basappa wrote: Hello Uri, Thanks for the explanation. I figured this out once I ran the code where I got this doubt

array to hash array

2010-07-26 Thread Sharan Basappa
Hi, Can someone tell me how to convert an array to hash. Each array entry has a row of values e.g. a(0) = ab cd ef; a(1) = mn de fg The hash array needs to be constructed with one of the element in the array row as the key. e.g. hash{ab} = cd ef - ab is a string in the array row

hash arrays

2010-07-26 Thread Sharan Basappa
Folks, I am reusing a code for some enhancements. According to my understanding, it is a record with some unique string as key and then hash array as the value. I iterate through the array and print as follows: foreach my $key (keys %{$abc}) { print $key ${$abc}{$key} \n; } I get values such

Re: hash arrays

2010-07-26 Thread Sharan Basappa
Thank you, Bob others. I think I now understand better. I have the source code. So now I should be able to figure this out. Regards, Sharan On Mon, Jul 26, 2010 at 6:00 PM, Rob Coops rco...@gmail.com wrote: On Mon, Jul 26, 2010 at 2:09 PM, Sharan Basappa sharan.basa...@gmail.com wrote

need explanation

2010-07-16 Thread Sharan Basappa
Folks, I am putting a line of code which I am not able to clearly understand. This is a reuse ... my(@table) = @{$tableRef}; The tableRef is returned as a reference after reading a file that contains record. Two questions: 1) what does @{$tableRef} really do? 2) what does @table contain?

Re: need explanation

2010-07-16 Thread Sharan Basappa
Thanks, Vishal. I was confused with usage {}. So you are saying that it will dereference the array. Isn't @$tableRef not enough in that case? Regards, Sharan On Fri, Jul 16, 2010 at 3:33 PM, Vishal Gupta vishal.knit2...@hotmail.com wrote: Hi Sharan, Please find below the answers: 1) what

parsing csv

2010-07-02 Thread Sharan Basappa
Folks, I have to parse a csv file and convert it into some other format. Can someone tell me what support perl has for csv parsing. My requirements are very modest, so somethng simple would be preferable. Regards, Sharan -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: parsing csv

2010-07-02 Thread Sharan Basappa
On Fri, Jul 2, 2010 at 2:19 PM, Shlomi Fish shlo...@iglu.org.il wrote: On Friday 02 Jul 2010 11:40:05 Sharan Basappa wrote: Folks, I have to parse a csv file and convert it into some other format. Can someone tell me what support perl has for csv parsing. My requirements are very modest, so

Re: parsing csv

2010-07-02 Thread Sharan Basappa
`tune=generic' cc1: unrecognized option `-fstack-protector' cc1: invalid parameter `ssp-buffer-size' Can someone help me ... Regards, Sharan On Fri, Jul 2, 2010 at 2:35 PM, Shlomi Fish shlo...@iglu.org.il wrote: On Friday 02 Jul 2010 11:55:47 Sharan Basappa wrote: On Fri, Jul 2, 2010 at 2:19

Re: parsing csv

2010-07-02 Thread Sharan Basappa
Hi Jason, Does CSV module come prebuilt so that I can avoid installing. I dont know SQL but my requirements are very modest. Extract lines and get filed and reformat them to another type. Regads, Sharan On Fri, Jul 2, 2010 at 3:53 PM, Jason Feng q15...@hotmail.com wrote: Hi there, If you

Re: parsing csv

2010-07-02 Thread Sharan Basappa
cc1: invalid option `tune=generic' cc1: unrecognized option `-fstack-protector' cc1: invalid parameter `ssp-buffer-size' On Fri, Jul 2, 2010 at 4:04 PM, Alan Haggai Alavi alanhag...@alanhaggai.org wrote: On 2 July 2010 15:56, Sharan Basappa sharan.basa...@gmail.com wrote: Hi Jason, Does CSV

Re: perl on windows

2009-05-19 Thread Sharan Basappa
Actually there was no exe. I only got a zip folder and uncompressed. I am clueless what to do after that... Regards, On Tue, May 19, 2009 at 1:26 AM, Dr.Ruud rvtol+use...@isolution.nl wrote: Sharan Basappa wrote: Ruud: Sharan: I would like to know install perl on my windows laptop. Any

Re: perl on windows

2009-05-18 Thread Sharan Basappa
I downloaded strawberry and extracted it. I dont see any install notes. Any idea how to install (is extraction all we have to do) Regards, Sharan On Sat, May 16, 2009 at 12:51 AM, Dr.Ruud rvtol+use...@isolution.nl wrote: Sharan Basappa wrote: I would like to know install perl on my windows

perl on windows

2009-05-15 Thread Sharan Basappa
Hi, I would like to know install perl on my windows laptop. Any suggestions on which one to use. Also, my work requires some special modules like algorithm. How do I handle that? Regards -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail:

Re: perl on windows

2009-05-15 Thread Sharan Basappa
Thanks a lot. Another question, does it also have an IDE kind of environment just to make my life easy? Regards On Fri, May 15, 2009 at 7:38 PM, JeffHua jeff...@aol.com wrote: Sharan Basappa: Hi, I would like to know install perl on my windows laptop. Any suggestions on which one to use

Re: perl on windows

2009-05-15 Thread Sharan Basappa
I am not talking about text editors, but GUI IDEs that help compile, run, debug (probably do more I dont know) On Fri, May 15, 2009 at 7:52 PM, JeffHua jeff...@aol.com wrote: Sharan Basappa : Thanks a lot. Another question, does it also have an IDE kind of environment just to make my life

Re: perl on windows

2009-05-15 Thread Sharan Basappa
Thanks. That answers my question... On Fri, May 15, 2009 at 8:04 PM, JeffHua jeff...@aol.com wrote: Sharan Basappa: I am not talking about text editors, but GUI IDEs that help compile, run, debug (probably do more I dont know) But Perl is just an old script language, many guys of here

xml parsing

2009-04-29 Thread Sharan Basappa
Hi, I have a kind of user defined xml file where users enter their test information. I need to parse the xml file, get the relevant data and then use the test information to invoke low level scripts that run the tests. Is there a xml parser that can do this job? Also, I have heard a bit about xml

Re: xml parsing

2009-04-29 Thread Sharan Basappa
On Wed, Apr 29, 2009 at 7:54 PM, Bruce Ferrell bferr...@baywinds.org wrote: Have a look at XML::Simple I'm a lousy programmer and even I can use it :) Thanks, Bruce. My requirements are really modest, so I think this should be sufficient ... -- To unsubscribe, e-mail:

Re: perl what

2009-03-19 Thread Sharan Basappa
since I am not a SW guy). I just want to make sure I am spending time in the right area. So sending this mail. Regards, On Tue, Mar 17, 2009 at 11:41 AM, Chas. Owens chas.ow...@gmail.com wrote: On Tue, Mar 17, 2009 at 01:58, Sharan Basappa sharan.basa...@gmail.com wrote: Hi Chas, Clearly I did

Re: perl what

2009-03-19 Thread Sharan Basappa
comes from the log file itself) There can be multiple rows of log information (which I call as streams). The stream info also comes from the log file. Thanks in advance ... On Thu, Mar 19, 2009 at 2:50 PM, Dermot paik...@googlemail.com wrote: 2009/3/19 Sharan Basappa sharan.basa...@gmail.com

Re: perl what

2009-03-17 Thread Sharan Basappa
Some user interaction is expected, at least in terms of clicking to get additional details of a log point ... But yes, since more might be required later, I would probably go with (G)TK Regards On Tue, Mar 17, 2009 at 1:47 PM, Thomas Bätzler t.baetz...@bringe.com wrote: Sharan Basappa

perl what

2009-03-16 Thread Sharan Basappa
Hi, We have quite a bit of log information generated during our work. The thought I have is to create a tool that actually takes all the info in the log and then displays in a visual manner. I have fair amount of experience in Perl but for an application of this kind, I am wondering what I need

Re: perl what

2009-03-16 Thread Sharan Basappa
16, 2009 at 8:59 PM, Chas. Owens chas.ow...@gmail.com wrote: On Mon, Mar 16, 2009 at 10:31, Sharan Basappa sharan.basa...@gmail.com wrote: Hi, We have quite a bit of log information generated during our work. The thought I have is to create a tool that actually takes all the info in the log

Re: removing an arbitrary element from array

2009-01-28 Thread Sharan Basappa
On Sun, Dec 7, 2008 at 2:01 AM, Rob Dixon rob.di...@gmx.com wrote: Sharan Basappa wrote: I was wondering if there is a quick way to remove an arbitrary element from an array. I have an array which stores _ delimited strings a_b_c_1). The last string stores the rank of the string. I have

Re: removing an arbitrary element from array

2009-01-28 Thread Sharan Basappa
Thank you ... -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

launch process

2009-01-16 Thread Sharan Basappa
Hi, What is the method to launch unix process from perl. I believe this is going to be system call. The additional requirement I have is that the calls should be non blocking mainly as these process execution should happen in parallel. Regards, Sharan -- To unsubscribe, e-mail:

Re: implementing algo

2008-12-25 Thread Sharan Basappa
Hi Jenda, Rob, Shawn, I am attaching a sample flowchart figure. Step1 and Step2 are the process steps and D1 and D2 are the decisions. Will this code translate to the foll in perl? do { do { step1 } while (D1) step2 } while (D2) What if D2 traces back to Step2 instead? How

implementing algo

2008-12-24 Thread Sharan Basappa
Hi, I am implementing an algorithm that I have worked out in theory. The algorithm is in the form of a flowchart. The area where I am having problem is where the flow passes from a lower decision block to higher one. I can implement this using a do while block for such flow. The issue is when

Re: removing an arbitrary element from array

2008-12-10 Thread Sharan Basappa
On Sun, Dec 7, 2008 at 2:01 AM, Rob Dixon [EMAIL PROTECTED] wrote: Sharan Basappa wrote: I was wondering if there is a quick way to remove an arbitrary element from an array. I have an array which stores _ delimited strings a_b_c_1). The last string stores the rank of the string. I have

removing an arbitrary element from array

2008-12-05 Thread Sharan Basappa
Hi, I was wondering if there is a quick way to remove an arbitrary element from an array. I have an array which stores _ delimited strings a_b_c_1). The last string stores the rank of the string. I have to remove a string from array that has the lowest number. e.g. a_b_c_1, a_b_c_2. In this

wait for file creation and wait

2008-11-26 Thread Sharan Basappa
Hi, I am writing a scheduler for some proprietary task. There are two questions pertaining to this 1) I have to wait for creation of a file by some external process. How do I do that in perl? In other words, is it possible to list out the files in perl? 2) If file is not created then I have to

system command

2008-11-26 Thread Sharan Basappa
Hi, I am trying to launch a program using system command. The program usually takes 20-30 minutes to complete. I launch the programs in a loop. Will the system command wait for first program to complete and then proceed to the next one. What if I want to launch these programs in parallel which is

Re: system command

2008-11-26 Thread Sharan Basappa
Or you might want to use threads, though they are certainly not the same both have their advantages and you might want to read up on them before making a decission on which to use. In any case I would advise you to first, use which ever way of modeling you prefer, to draw out the way the

random

2008-11-25 Thread Sharan Basappa
Hi, Would like to know if perl has native (without using special modules) for generating random numbers? Regards -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: algorithm permute

2008-11-18 Thread Sharan Basappa
Tom Jay, Thanks a lot. Actually the user is same. I have confirmed again. I know it irritates a lot when a help seeker posts incorrect data and requests support. But in this case, the user is same. I have not gone deep into the issue. But the distinct difference is that in the terminal where it

Re: algorithm permute

2008-11-17 Thread Sharan Basappa
You haven't installed anything. You've downloaded and untarred/ gunzipped the source. You still have to run perl Makefile.PL make make test make install That final command will copy the installed module to the real library directory. THAT is the path that you need for use lib.

Re: algorithm permute

2008-11-13 Thread Sharan Basappa
Just an update. I have installed to a new location and can see the following files /u/basappas/local/perl/Algorithm-Permute-0.06/ Algorithm Changes Makefile.PL Perm2.plPermute.o pm_to_blib typemap bench lib MANIFEST Permute.bs Permute.pm share blib Makefile

Re: algorithm permute

2008-11-11 Thread Sharan Basappa
Hi Paul, Regards On Mon, Nov 10, 2008 at 11:06 PM, Paul Lalli [EMAIL PROTECTED] wrote: On Nov 10, 9:15 am, [EMAIL PROTECTED] (Sharan Basappa) wrote: Hi, After working fine with Algorithm::Permute module for weeks now, suddenly I seem to be getting errors. The particular error

Re: insert keyword

2008-11-11 Thread Sharan Basappa
Hi, I have a string that has value delimited by space e.g. 1 2 10 8 etc. I need to add a keyword wherever there is a space. I wrote a small code to try this out: $str = one two three; $str =~ s/\s/x /g; In this case, I am trying to insert x where there is a space. one two three should

algorithm permute

2008-11-10 Thread Sharan Basappa
Hi, After working fine with Algorithm::Permute module for weeks now, suddenly I seem to be getting errors. The particular error is: $ perl StTrAuto.pl Can't locate Algorithm/Permute.pm in @INC (@INC contains: /u/sharan/local/perl/perm_install/lib/perl5/site_perl .) at StTrAuto.pl line 4. BEGIN

insert keyword

2008-11-10 Thread Sharan Basappa
Hi, I have a string that has value delimited by space e.g. 1 2 10 8 etc. I need to add a keyword wherever there is a space. I wrote a small code to try this out: $str = one two three; $str =~ s/\s/x /g; In this case, I am trying to insert x where there is a space. one two three should become

substitute multiple spaces with just one

2008-11-04 Thread Sharan Basappa
Hi, I have string that has one or more spaces. I would like to replace them with a single space. The simple code below replaces the spaces fine, but does not substitute with a space. $temp = 0 1 2 34; - version 1 $temp =~ s/\s+/\s/g; $temp = 0 1 2 34; - version 2 $temp =~

Re: substitute multiple spaces with just one

2008-11-04 Thread Sharan Basappa
You are completely right. :-) What you want to be doing is this: $temp =~ s/\s+/ /g; The reason for that is simple, \s is used to match a space or multiple spaces, it is not used to print a space that is actually done by the ' ' (space). It might seem a little strange at first but just try

Re: debugger exiting

2008-11-04 Thread Sharan Basappa
My final comment is that $temp is an awful name for a variable under almost any circumstances. I do agree. More often than not, if I dont have a meaningful name for a variable it is mainly because the problem and solution are not worked out clearly in mind. -- To unsubscribe, e-mail: [EMAIL

debugger exiting

2008-11-03 Thread Sharan Basappa
Hi, I am using debugging for a program of mine. The debugger exits probably after a regex match fail. I am not sure why it should exit. Any ideas, clues? Regards main::(StTrAuto.pl:106): my @new_auto_tr = (); DB2 s main::(StTrAuto.pl:107): foreach $temp (@auto_tr)

match and putting in a variable with a single statement

2008-10-24 Thread Sharan Basappa
Hi, I was just trying to match a string and save it in a single statement as follows: $extracted = cp xyz; $state_var = $extracted =~ m/cp\s+(.*)/; print $state_var $1 \n; The output is: 1 xyz So the assignment to $state_var does not work. Is this an incorrect way. Regards -- To

Re: match and putting in a variable with a single statement

2008-10-24 Thread Sharan Basappa
On Fri, Oct 24, 2008 at 8:42 PM, Chas. Owens [EMAIL PROTECTED] wrote: On Oct 24, 2008, at 11:00, Sharan Basappa [EMAIL PROTECTED] wrote: Hi, I was just trying to match a string and save it in a single statement as follows: $extracted = cp xyz; $state_var = $extracted =~ m/cp\s

Re: using algorithm-permute

2008-10-22 Thread Sharan Basappa
On Wed, Oct 22, 2008 at 4:32 AM, Rob Dixon [EMAIL PROTECTED] wrote: Sharanbr wrote: On Oct 19, 6:38 am, [EMAIL PROTECTED] (Sisyphus) wrote: On Oct 17, 3:04 am, [EMAIL PROTECTED] (Sharan Basappa) wrote: #!/usr/bin/perl use warnings; use Algorithm::Permute; my @array = (1..4); Algorithm

using algorithm-permute

2008-10-16 Thread Sharan Basappa
Hi, I need to create permutations of a given set of values. The set is itself present in an array. From this I am trying to create another array that has permutations of this set. I am able to create a small example and run but from the description of the module I am not sure how to put the

Re: add module path

2008-10-14 Thread Sharan Basappa
On Sat, Oct 11, 2008 at 5:51 PM, Jeff Pang [EMAIL PROTECTED] wrote: Message du 10/10/08 17:59 De : Sharan Basappa A : Jeff Pang Copie à : Perl Beginners Objet : Re: add module path These are system installation. Can you tell me upto what directory should I be including use lib path

Re: extract text between keywords

2008-10-14 Thread Sharan Basappa
On Fri, Oct 10, 2008 at 9:49 PM, Rob Dixon [EMAIL PROTECTED] wrote: Sharan Basappa wrote: I am trying to process a code for some processing. The code looks like keywordx ... keywordy identifier_a some text endkeywordy keywordz identifier_a some text endkeywordz

Re: extract text between keywords

2008-10-14 Thread Sharan Basappa
On Tue, Oct 14, 2008 at 8:50 PM, Rob Dixon [EMAIL PROTECTED] wrote: Sharan Basappa wrote: On Fri, Oct 10, 2008 at 9:49 PM, Rob Dixon [EMAIL PROTECTED] wrote: If your problem really is that simple, and you don't expect 'keywordy' blocks to be nested inside other 'keywordy' blocks

add module path

2008-10-10 Thread Sharan Basappa
Hi, I have 2 permute and Text-balanced modules installed. They are in the path: /home/user/local/perl/ I tried an example for permute by including the module path as: /home/user/local/perl/perm_install/lib/perl5/site_perl Now this seems to go through. For Text-balanced, I dont find similar

Re: add module path

2008-10-10 Thread Sharan Basappa
2008/10/10 Jeff Pang [EMAIL PROTECTED]: Message du 10/10/08 16:49 De : Sharan Basappa A : Perl Beginners Copie à : Objet : add module path Hi, I have 2 permute and Text-balanced modules installed. They are in the path: /home//local/perl/ consider 'use lib' at the script's begin

Re: add module path

2008-10-10 Thread Sharan Basappa
that the path I am including should have .pm file under the directory. Please note that currently under the lib directory installed, there is no .pm file Regards On Fri, Oct 10, 2008 at 8:49 PM, Jeff Pang [EMAIL PROTECTED] wrote: Message du 10/10/08 17:13 De : Sharan Basappa For example, the text-balanced

extract text between keywords

2008-10-10 Thread Sharan Basappa
Hi, I am trying to process a code for some processing. The code looks like keywordx ... keywordy identifier_a some text endkeywordy keywordz identifier_a some text endkeywordz endkeywordx From this, I would like to extract text starting from keywordy and endkeywordy. Is using

Re: add module path

2008-10-10 Thread Sharan Basappa
These are system installation. Can you tell me upto what directory should I be including use lib path? Regards On Fri, Oct 10, 2008 at 9:10 PM, Jeff Pang [EMAIL PROTECTED] wrote: Message du 10/10/08 17:32 De : Sharan Basappa A : Jeff Pang Copie à : Perl Beginners Objet : Re: add module path

Re: extracting multiple statements ...

2008-09-23 Thread Sharan Basappa
On Mon, Sep 22, 2008 at 9:02 PM, Thomas Bätzler [EMAIL PROTECTED] wrote: Hi, Sharan Basappa [EMAIL PROTECTED] asked: I have a code snippet as follows: keyword id1 = a x b x c; keyword id2 = c x d x e; I would like to extract strings a x b x c and c x d x e. I know I can loop through

extracting multiple statements ...

2008-09-22 Thread Sharan Basappa
Hi, I have a code snippet as follows: keyword id1 = a x b x c; keyword id2 = c x d x e; I would like to extract strings a x b x c and c x d x e. I know I can loop through the code and extract the strings, but is there a RE that can do this with a single statement. My first guess was to use /s

Re: grabbing text between two tokens

2008-04-24 Thread Sharan Basappa
OTOH, I don't see the point in struggling with Text::Balanced, when all you need is: my @extracted = $source =~ /covergroup.+?endgroup/gs; The example I gave is simple but will become more complex as I keep adding functionality to it. More complex input is yet to come. Also, I believe

Re: grabbing text between two tokens

2008-04-23 Thread Sharan Basappa
On Wed, Apr 23, 2008 at 8:33 PM, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote: Sharan Basappa wrote: I have gone through the text-balanced doc and tried few examples myself. Looks like I need some help on this module usage and capabilities. Basically the text I am trying to extract

Re: grabbing text between two tokens

2008-04-22 Thread Sharan Basappa
On Wed, Apr 16, 2008 at 12:20 AM, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote: Sharan Basappa wrote: Gary Stainburn wrote: On Monday 14 April 2008 16:35, Sharan Basappa wrote: I am trying to capture the text between two tokens. These tokens always exist in pairs but can

Re: installing Text-Balanced module

2008-04-21 Thread Sharan Basappa
On Sat, Apr 19, 2008 at 12:35 AM, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote: Sharan Basappa wrote: I downloaded version and installed it. That went smoothly. When I go back to text-balanced installation, it still does not seem to locate version.pm I think it's advisable to follow

Re: installing Text-Balanced module

2008-04-18 Thread Sharan Basappa
On Thu, Apr 17, 2008 at 9:17 PM, Chas. Owens [EMAIL PROTECTED] wrote: On Apr 17, 2008, at 11:41, Sharan Basappa wrote: PREREQ_PM = { 'Test::More' = 0, 'version'= 0, },snip So, that means I have to install this module? Regards snip That means that both

Re: algorithm/permute.pm

2008-04-17 Thread Sharan Basappa
On Thu, Apr 17, 2008 at 1:26 AM, Rob Dixon [EMAIL PROTECTED] wrote: Sharan Basappa wrote: Rob, I replied to Chas' mail with steps I have followed to install the module. I have also tried omitting Algorithm to PREFIX, but that does not help. perl Makefile.PL PREFIX=/u/basappas

Re: algorithm/permute.pm

2008-04-17 Thread Sharan Basappa
On Thu, Apr 17, 2008 at 7:37 PM, Chas. Owens [EMAIL PROTECTED] wrote: On Apr 17, 2008, at 10:03, Sharan Basappa wrote: snip $perl Makefile.PL PREFIX=/u/basappas/local/perl/perm_install snip Try use lib /u/basappas/local/perl/perm_install/lib/perl5/site_perl; -- Chas

installing Text-Balanced module

2008-04-17 Thread Sharan Basappa
I am installing Text-Balanced module locally. perl Makefile.PL .. step does not complete. It bails out with the foll. error: Warning: prerequisite version 0 not found. Could not eval ' package ExtUtils::MakeMaker::_version; no strict; local $VERSION;

Re: installing Text-Balanced module

2008-04-17 Thread Sharan Basappa
On Thu, Apr 17, 2008 at 8:41 PM, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote: Sharan Basappa wrote: I am installing Text-Balanced module locally. perl Makefile.PL .. step does not complete. It bails out with the foll. error: Warning: prerequisite version 0 not found. snip

Re: installing Text-Balanced module

2008-04-17 Thread Sharan Basappa
unfortunately the server I am trying to install the module is not connected to net. Regards On Thu, Apr 17, 2008 at 9:05 PM, Chas. Owens [EMAIL PROTECTED] wrote: On Thu, Apr 17, 2008 at 10:57 AM, Sharan Basappa [EMAIL PROTECTED] wrote: I am installing Text-Balanced module locally. perl

Re: installing Text-Balanced module

2008-04-17 Thread Sharan Basappa
On Thu, Apr 17, 2008 at 9:07 PM, Chas. Owens [EMAIL PROTECTED] wrote: On Thu, Apr 17, 2008 at 11:34 AM, Sharan Basappa [EMAIL PROTECTED] wrote: On Thu, Apr 17, 2008 at 8:41 PM, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote: Sharan Basappa wrote: I am installing Text-Balanced

Re: algorithm/permute.pm

2008-04-16 Thread Sharan Basappa
. On Apr 15, 2008, at 12:00, Sharan Basappa wrote: On Fri, Apr 4, 2008 at 8:48 PM, Sharan Basappa [EMAIL PROTECTED] wrote: Dont seem to have luck. I did make test followed by make install. Here is what I got: make install Installing /u/basappas/local/perl/Algorithm-Permute-0.06

Re: algorithm/permute.pm

2008-04-16 Thread Sharan Basappa
in my script TIA, Regards On Tue, Apr 15, 2008 at 11:05 PM, Rob Dixon [EMAIL PROTECTED] wrote: Sharan Basappa wrote: On Fri, Apr 4, 2008 at 8:48 PM, Sharan Basappa [EMAIL PROTECTED] wrote: Dont seem to have luck. I did make test followed by make install. Here is what I got: make

Re: grabbing text between two tokens

2008-04-15 Thread Sharan Basappa
, Sharan Basappa wrote: Hi, I am trying to capture the text between two tokens. These tokens always exist in pairs but can occur N times. I somehow dont get what I want. $str =~ m/tokena(.*)tokenb/ms; print $1; Try $str =~ m/tokena(.*?)tokenb/ms; The ? after

Re: grabbing text between two tokens

2008-04-15 Thread Sharan Basappa
, Apr 14, 2008 at 9:44 PM, Chas. Owens [EMAIL PROTECTED] wrote: On Apr 14, 2008, at 11:35, Sharan Basappa wrote: Hi, I am trying to capture the text between two tokens. These tokens always exist in pairs but can occur N times. I somehow dont get what I want. snip You might

Re: algorithm/permute.pm

2008-04-15 Thread Sharan Basappa
On Fri, Apr 4, 2008 at 8:48 PM, Sharan Basappa [EMAIL PROTECTED] wrote: Dont seem to have luck. I did make test followed by make install. Here is what I got: make install Installing /u/basappas/local/perl/Algorithm-Permute-0.06/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto

grabbing text between two tokens

2008-04-14 Thread Sharan Basappa
Hi, I am trying to capture the text between two tokens. These tokens always exist in pairs but can occur N times. I somehow dont get what I want. e.g. In the example below, I would like to capture text between tokena and tokenb. So it should capture name1 and name2. $str = tokena name: name1

Re: algorithm/permute.pm

2008-04-04 Thread Sharan Basappa
Dont seem to have luck. I did make test followed by make install. Here is what I got: make install Installing /u/basappas/local/perl/Algorithm-Permute-0.06/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Algorithm/Permute/Permute.so Installing

cant find locally installed module

2008-04-01 Thread Sharan Basappa
I have installed permute module locally and added the path to my script. However, perl fails to find the module. The script: #!/usr/bin/perl use lib /u/basappas/local/perl/Algorithm-Permute-0.06; use Algorithm::Permute; my @array = (1..9); Algorithm::Permute::permute { print @array\n } @array;

Re: algorithm/permute.pm

2008-03-31 Thread Sharan Basappa
library? Regards On Wed, Mar 26, 2008 at 3:45 PM, sisyphus [EMAIL PROTECTED] wrote: On Mar 25, 2:52 am, [EMAIL PROTECTED] (Sharan Basappa) wrote: Hi, I am trying to use permute call from the above module and I get the following error. I believe this is due to either missing lib

Re: algorithm/permute.pm

2008-03-31 Thread Sharan Basappa
), \n; } my @array = (1..9); Algorithm::Permute::permute { print @array\n } @array; Where Am I going wrong? Regards On Mon, Mar 31, 2008 at 6:40 PM, Sharan Basappa [EMAIL PROTECTED] wrote: I did the following: perl Makefile.PL PREFIX=/u/basappas/local/perl/Algorithm-Permute-0.06 I got

parser using perl

2008-03-31 Thread Sharan Basappa
Hi, I am trying to extract information from a file that follows the syntax of a high level language (something like C++) The script just needs to understand a very minuscule portion of this language to do this. It does not have to know the complete high level language. I just wanted to know any

Re: parser using perl

2008-03-31 Thread Sharan Basappa
a look at the parser library. Thanks ... Regards On Mon, Mar 31, 2008 at 8:16 PM, Chas. Owens [EMAIL PROTECTED] wrote: On Mon, Mar 31, 2008 at 10:36 AM, Sharan Basappa [EMAIL PROTECTED] wrote: Hi, I am trying to extract information from a file that follows the syntax of a high

Re: parser using perl

2008-03-31 Thread Sharan Basappa
comments etc. Regards, On Mon, Mar 31, 2008 at 8:30 PM, Chas. Owens [EMAIL PROTECTED] wrote: On Mon, Mar 31, 2008 at 10:51 AM, Sharan Basappa [EMAIL PROTECTED] wrote: I am not a compler expert, but if I all I am interested in few productions out of many productions, I can setup

copy array

2008-03-25 Thread Sharan Basappa
Hi, Is there a way I can copy only part of an array into another array. For example, I want to copy only first 8 elements of source array into destination array. Regards -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: copy array

2008-03-25 Thread Sharan Basappa
thanks. I can also assume that variables work instead of 0..7 ($1..$2) so that I can write this as an general algo On Tue, Mar 25, 2008 at 9:31 PM, Rob Dixon [EMAIL PROTECTED] wrote: Sharan Basappa wrote: Hi, Is there a way I can copy only part of an array into another array

algorithm/permute.pm

2008-03-24 Thread Sharan Basappa
Hi, I am trying to use permute call from the above module and I get the following error. I believe this is due to either missing lib or incorrect path setting. Can you tell me how to install this package quickly in my home path and try out this call? Regards Can't locate Algorithm/Permute.pm in

Re: contributing to perl

2008-03-21 Thread Sharan Basappa
PM, Sharan Basappa [EMAIL PROTECTED] wrote: Hi, I was thinking of contributing a utility function to perl. Want to know what is the procedure. Also, note that I dont have exposure to oops concept of perl (though I have exposure to general oops concept) Regards

Re: contributing to perl

2008-03-21 Thread Sharan Basappa
or perl6? for perl5 you can subscribe to this list: http://lists.cpan.org/showlist.cgi?name=perl5-porters otherwise for perl6 you can subscribe to: http://lists.cpan.org/showlist.cgi?name=perl6-internals good luck on the processing. On Fri, Mar 21, 2008 at 5:25 PM, Sharan Basappa [EMAIL

Re: contributing to perl

2008-03-21 Thread Sharan Basappa
ok. That clarifies ... On Fri, Mar 21, 2008 at 3:29 PM, J. Peng [EMAIL PROTECTED] wrote: On Fri, Mar 21, 2008 at 5:55 PM, Sharan Basappa [EMAIL PROTECTED] wrote: Thanks, I will take a look. But going by the webpage, it seems to me that the changes will to the language itself

measuring performance

2008-03-20 Thread Sharan Basappa
* Haven't done this before, so need help * Hi, I am implementing two algos to solve same problem. I would like to measure the performance of these 2 algos (in terms of CPU cycles or wall clock etc.) I have seen some explanation in some library document in perl the comparison between different

Re: measuring performance

2008-03-20 Thread Sharan Basappa
20, 2008 at 6:21 PM, Chas. Owens [EMAIL PROTECTED] wrote: On Thu, Mar 20, 2008 at 7:21 AM, Sharan Basappa [EMAIL PROTECTED] wrote: snip I am implementing two algos to solve same problem. I would like to measure the performance of these 2 algos (in terms of CPU cycles or wall clock etc

Re: measuring performance

2008-03-20 Thread Sharan Basappa
AM, Sharan Basappa [EMAIL PROTECTED] wrote: Thanks, this is really helpful. In addition, is there a way to print the cpu cycles taken from *ux command prompt? I have worked with tools that, at the end of their job, print out the cpu cycles it took for them. I would assume

  1   2   >