Re: How to navigate through a hash of hashes of arrays (?) to get to the first array entry

2016-04-14 Thread Raj Barath
I was wrong. Please don't use my example. Aaron wells explanation is perfect. Apologies for the confusion. -Raj On Thu, Apr 14, 2016 at 11:15 AM, Aaron Wells mailto:chacewe...@gmail.com>> wrote: Hi Kenneth, Welcome aboard (for the nth time)! The replies on this thread have been h

Re: How to navigate through a hash of hashes of arrays (?) to get to the first array entry

2016-04-14 Thread Raj Barath
I was wrong. Please don't use my example. Aaron wells explanation is perfect. Apologies for the confusion. -Raj On Thu, Apr 14, 2016 at 11:15 AM, Aaron Wells mailto:chacewe...@gmail.com>> wrote: Hi Kenneth, Welcome aboard (for the nth time)! The replies on this thread have been h

Re: How to navigate through a hash of hashes of arrays (?) to get to the first array entry

2016-04-14 Thread Raj Barath
'type' => 'Product2' }, 'sObject' ) ]; say @{ %{ @{$VAR1}[0]}{'Id'}}[0]; say @{ %{ @{$VAR1}[0]}{'Id'}}[1]; say ${ @{$VAR1}[0]}{'type'}; __Output__ perl test1.pl<http://test1.pl> 01tC0

Re: How to navigate through a hash of hashes of arrays (?) to get to the first array entry

2016-04-14 Thread Raj Barath
'type' => 'Product2' }, 'sObject' ) ]; say @{ %{ @{$VAR1}[0]}{'Id'}}[0]; say @{ %{ @{$VAR1}[0]}{'Id'}}[1]; say ${ @{$VAR1}[0]}{'type'}; __Output__ perl test1.pl<http://test1.pl> 01tC0

Re: reading directories using perl in windows

2016-03-01 Thread Raj Barath
Try using readdir http://perldoc.perl.org/functions/readdir.html On Tue, Mar 1, 2016, 5:24 AM Arghya Das mailto:arghya0...@gmail.com>> wrote: use warnings; $dir = "c:/folder/*"; my @files = glob( $dir ); foreach (@files ){ print $_ . "\n"; } i am trying to read windows directory using abo

Re: Hash in file Formats

2015-12-16 Thread Raj Barath
Can you share a simple of JSON file and from that let us know what you want to capture. On Wed, Dec 16, 2015, 3:41 PM perl kamal mailto:kamal.p...@gmail.com>> wrote: ++Subject & Thanks. On Thu, Dec 17, 2015 at 1:08 AM, perl kamal mailto:kamal.p...@gmail.com>> wrote: Hi, I am trying to read a

Re: Hash in file Formats

2015-12-16 Thread Raj Barath
Can you share a simple of JSON file and from that let us know what you want to capture. On Wed, Dec 16, 2015, 3:41 PM perl kamal mailto:kamal.p...@gmail.com>> wrote: ++Subject & Thanks. On Thu, Dec 17, 2015 at 1:08 AM, perl kamal mailto:kamal.p...@gmail.com>> wrote: Hi, I am trying to read a

Fwd: regex problem?

2015-11-25 Thread Raj Barath
-- Forwarded message -- From: Raj Barath mailto:barat...@outlook.com>> Date: Wed, Nov 25, 2015 at 1:16 PM Subject: Re: regex problem? To: Rick T mailto:p...@reason.net>> Hi Rick, You can use split. For example: my ( $stud_surname, $stud_number ) = split ( /-/,

Re: Protein fragment recognition!

2015-09-20 Thread Raj Barath
+perl-beginners forgot to hit reply all On Sun, Sep 20, 2015, 7:00 PM Raj Barath wrote: > Hi, > I have added the comments. But to understand even better please go through > the official documentation such as: > http://perldoc.perl.org/index-tutorials.html > > > my %hash

Re: Protein fragment recognition!

2015-09-20 Thread Raj Barath
Hi, Is this is what you're looking for ? my %hash; while( my $line = ){ chomp $line; my ( $scaf, $pro_per ) = $line =~ m/\sHit=(.*?)\s.*?Percent_id=(.*?)$/g; push @{$hash{$1}}, $2; } print Dumper (\%hash); Output: $VAR1 = { 'scaffold293_size341291' => [

Re: Looking for introductory to advanced examples of RESTful programming in Perl

2015-08-11 Thread Raj Barath
pod/Dancer2::Tutorial -Raj On Tue, Aug 11, 2015 at 10:50 PM, Kenneth Wolcott wrote: > Hello; > > I'm looking for introductory to advanced examples of RESTful > programming in Perl preferably with some good explanations and best > practices. > > Thanks, > Ken Wolcott &g

Re: Getting 2/8 as output

2015-06-13 Thread Raj Barath
You can go over the hash using for loop like for ( keys %hash ){ print $_ => $hash{$_}. "\n"; } On Jun 13, 2015 1:40 PM, "rakesh sharma" wrote: > Hi > > I am printing a hash but I tried to concatenate the new line operator and > I am getting 2/8 as output; > > print %hash."\n"; > > output

Re: Creating PDF file from text

2015-05-15 Thread Raj Barath
You can use PDF create module from cpan. http://search.cpan.org/~szabgab/PDF-Create-1.10/lib/PDF/Create.pm -Raj On May 15, 2015 2:26 AM, "Francisco Valladolid H." wrote: > Hi Folks. > > I have a script in Perl that read a CVS file with several fields, it > extract

Re: How to list all Linux machines info with perl ?

2011-03-02 Thread Raj Shekhar
In infinite wisdom sync wrote: > I have many linux machines connected in a network. > Now I want ot create a perl script which will list all the machines info in > a network. Check the "collect" tool, written by Percona guys <http://aspersa.googlecode.com/svn/html/

current record number with if statement

2010-09-20 Thread Raj
Hi, I am a newbie for perl. It would be fine if some explain how the following code prints first 10 lines of the file. My question here is, how/what if condition match happens? Is there anything related to current record number ($.) variable? while () { print if 1 .. 10; } Regards, Raj

RE: Help Required on the Script

2006-04-06 Thread Raymond Raj
mean by variable interpolation may be i don't know how to explain "variable interpolation", why not try in google? or some one else from this group will explain you Thanks > > Regards > Mazhar > > On 4/6/06, Raymond Raj <[EMAIL PROTECTED]> wrote: >

RE: Help Required on the Script

2006-04-06 Thread Raymond Raj
> -Original Message- > From: Mazhar [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 06, 2006 2:41 PM > To: Jaime Murillo > Cc: beginners@perl.org > Subject: Re: Help Required on the Script > > > Thank you giyz for the help i require one more help from > yourside. i have > one more code wh

RE: perl help : escape character

2006-04-05 Thread Raymond Raj
> -Original Message- > From: Irfan J Sayed [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 06, 2006 11:29 AM > To: beginners@perl.org > Subject: perl help : escape character > > > Hi All, > > I am running following clearcase command > > my @activity = `$CT lsactivity -short -invob

RE: Help Required on the Script

2006-04-05 Thread Raymond Raj
> -Original Message- > From: Mazhar [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 05, 2006 12:16 PM > To: beginners@perl.org > Subject: Help Required on the Script > > > Hi Guyz, > i am writin a script to automate the command > snmpwalk by reading > the contents of a fil

RE: can not filter out commentary lines with reg-exps

2006-03-29 Thread Raymond Raj
> -Original Message- > From: Harald [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 29, 2006 5:53 PM > To: beginners@perl.org > Subject: can not filter out commentary lines with reg-exps > > > Hi, > > I need to parse an ASCII file which first rows are comments. > Those rows > are

Re: [SPAM DETECT] New lines are not removed using HTML::Strip::Whitespace module

2005-12-13 Thread Durai raj
Hi, Thanks for the reply. Is there any other perl modules or tools available to remove the white space in HTML and JavaScript pages? Thanks, Durai Xavier Noria <[EMAIL PROTECTED]> wrote: On Dec 13, 2005, at 5:59, Durai raj wrote: >I tried to remove white space and newlines

New lines are not removed using HTML::Strip::Whitespace module

2005-12-12 Thread Durai raj
Hi All, I tried to remove white space and newlines from HTML pages using HTML::Strip::Whitespace module. It removes the white space, but not NEW LINES. Here is my script: use HTML::Strip::Whitespace qw(html_strip_whitespace); my $html = q {

RE: regexp for a blank line

2004-12-13 Thread Raj, Raymond
next if ($line =~ /^\s+$/); -Original Message- From: Christopher Spears [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 14, 2004 11:14 AM To: [EMAIL PROTECTED] Subject: regexp for a blank line I have to write a script that processes text in a file. The text includes lots of blank line

Newbie: Perl Vs Shell

2004-10-29 Thread Durai raj
Hello All, Anyone can explain the difference between Perl and Shell scripts? Regards, Durai. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.783 / Virus Database: 529 - Release Date: 10/27/2004 ---

RE: why can't getstore function overwrite the existing file?

2004-10-11 Thread Raymond Raj
you have using "$based_url" variable in my $status=getstore($based_url,$filename); but you have declare "$base_url" it's always better using 'use strict' and warnings pragma... -Original Message- From: Franklin [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 3:18 PM To: [EMA

RE: Creating a word document

2004-09-29 Thread Raymond Raj
hi use Win::OLE module some examples availbe at http://perlmonks.thepen.com/198045.html -Original Message- From: paul beckett (JIC) [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 29, 2004 6:58 PM To: [EMAIL PROTECTED] Subject: Creating a word document I've been trying to find a pe

RE: regex help

2004-09-23 Thread Raymond Raj
Hi! what's problem in these regular expressions.. every thing correct! do you need to convert one or more than one match into single replacement then regexp should be $safeString =~ s/\s+/_/g; -Original Message- From: Johnstone, Colin [mailto:[EMAIL PROTECTED] Sent: Friday, September

RE: import from text file to mysql

2004-09-23 Thread Raymond Raj
>my $sth=$dbh->prepare(" LOAD DATA LOCAL INFILE "/home/roime/MYSQL_PERL/IN_NETWORK/packet.txt" INTO TABLE flow FIELDS TERMINATED BY ',' "); here you had forgot escape the double quotes,should be escaped quotes: \"/home/roime/MYSQL_PERL/IN_NETWORK/packet.txt\" my $sth=$dbh->prepa

RE: how to change values of @INC

2004-09-22 Thread Raymond Raj
you can add new search path using use lib 'path List'; for delete no lib 'path list'; Raymond -Original Message- From: Bernd Mueller [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 8:04 PM To: [EMAIL PROTECTED] Subject: how to change values of @INC Hello, I am tr

RE: Two easy questions.

2004-09-20 Thread Raymond Raj
Hi! "assoc " and "ftype" commands are used to associate extension for particular file types.. >Is there a way to run my script without specifying "Perl" before the script? In other words, I want to type c:\myscript.plx >instead of c:\perl myscript.plx. yes you can, try "assoc /?

RE: entering text in perl/tk

2004-09-20 Thread Raymond Raj
(GEAE, Foreign National, EACOE) [mailto:[EMAIL PROTECTED] Sent: Monday, September 20, 2004 6:19 PM To: Raymond Raj; [EMAIL PROTECTED] Subject: RE: entering text in perl/tk Hi Raj, I don't have the Active State perl widget.bat. If I don't have this what else can be the option?

RE: entering text in perl/tk

2004-09-20 Thread Raymond Raj
Hi, did try widget.bat it's contain lot of example for perl/tk ..if you have Active State perl widget.bat comes with that version -Original Message- From: N, Guruguhan (GEAE, Foreign National, EACOE) [mailto:[EMAIL PROTECTED] Sent: Monday, September 20, 2004 5:50 PM To: [EMAIL PROTE

RE: Regex help

2004-09-13 Thread Raymond Raj
Hi, you should escape "/" char also, here is the problem must be <\/sub> still this regular expression will not give what you expecting result, it remove all alphanumeric char also.. for help try "perldoc perlre" or wait some time some one give good guide.. regards Raymond -Original Messa

RE: checking all pieces of split data for NULL

2004-08-13 Thread Raymond Raj
use "perldoc -f length" try "perldoc perldoc" how to use perldoc -Original Message- From: Radhika Sambamurti [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 11, 2004 11:16 PM To: [EMAIL PROTECTED] Subject: Re: checking all pieces of split data for NULL Hi, Just for extra informa

Re: Perl newbie: regexp

2004-06-17 Thread raj
I am clear. Thanks for replying all. - Original Message - From: "Bob Showalter" <[EMAIL PROTECTED]> To: "'raj'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, June 17, 2004 5:48 PM Subject: RE: Perl newbie: regexp > raj w

Perl newbie: regexp

2004-06-17 Thread raj
Hello All, I am new to perl. I want to display the lines which have "Testing" word. I have to do this in command line. I tried the with following options. Its not work what I expected. It dispalys all lines. perl -p -e 'print if /Testing/m' test.txt ANy help much appreciated! Reg

Newbie: regexp /o modifier

2004-06-08 Thread raj
Hello All, I have read modifier /o is used to compile the regexp only once. But I don't know how it affects regular expression practically. Can anyone explain about /o modifier with examples? ANy help much appreciated. Thanks, Durai. --- Outgoing mail is certified Virus Free. C

RE: reference to a subroutine in @INC

2003-11-11 Thread Raj (Basavaraj) Karadakal
I will definitely be looking into PAR. It looks like the best bet to me. Thanks for the information. -Basavaraj -Original Message- From: Paul Johnson [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 4:36 PM To: Raj (Basavaraj) Karadakal Cc: [EMAIL PROTECTED] Subject: Re

reference to a subroutine in @INC

2003-11-11 Thread Raj (Basavaraj) Karadakal
Hi, I am trying to package a perl script and the modules it uses , in a tar file. When untarred on any machine, the modules can be found in a known relative path with respect to the script. The path in which these modules are available can change depending on where the package got untarred.

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

Off topic

2002-10-16 Thread Anidil Rajendran-Raj
Hi, Sorry to ask this OT question. But i am sure I can get help here. I was looking for a good Linux admin mailing list. Thanks in advance

Newbie question

2002-03-25 Thread Anidil Rajendran-Raj
it there a better way? Thanks raj [EMAIL PROTECTED] 650.730.8271 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

newbie question

2002-03-25 Thread Anidil Rajendran-Raj
") or die; @array =3D ; my @phone; for each $string (@array) { $phone[$i] =3D ($string =3D~ /\s\d+\s\d+\s\d+:/) ; $i++; } This does not work, what am I doing wrong? or it there a better way? Thanks raj [EMAIL PROTECTED] 650.730.8271 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Book suggestion

2002-02-22 Thread Anidil Rajendran-Raj
Hi team, I am unix admin trying to learn perl. How is the book "LEARNING PERL BY EXAMPLE" by Ellie Quigley regs Anidil Rajendran (raj) Netliant,Inc 3600,Brigde Parkway Suite 102 Redwood City,CA 94065-1170 (650) 730 8271 <>

Re: Reading Multiple lines

2002-02-12 Thread J. Raj Mohan
Hi Andrea, Thanks for your great help. The 2nd solution is working for me... Thanks a LOT. Raj. - Original Message - From: Andrea Holstein <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 12, 2002 4:40 PM Subject: Re: Reading Multiple lines

Reading Multiple lies

2002-02-10 Thread Raj Mohan
Hi All, Is that anybody can help me to find a solution for the blow:- I have a file like this:- Input File:- In this I need to read (store into a string) multiple lines from: "" Pls. help me out. Raj.