Sorting files in a directory, without using any OS specific command, ordered by modified timestamp

2010-12-01 Thread Amit Saxena
root 1569 Dec 1 11:58 sort.pl *Perl Program Output* # perl /root/print_files_sort.pl This program print the files in ascending order of timestamp. Unsorted listing of files in directory are as follows :- sys_bkp.pl nohup.out2 nohup.out1 anaconda-ks.cfg install.log sort.pl mbox install.log.syslog Sorted listing of files in directory are as follows :- sys_bkp.pl nohup.out2 nohup.out1 anaconda-ks.cfg install.log sort.pl mbox install.log.syslog # Thanks & Regards, Amit Saxena

Re: [PBML] Re: Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread Amit Saxena
LOG "$now\tSSH is up on $target\n"; > } > else { > print LOG "$now\tSSH is down on $target\n"; > > } > } > > On 11/23/2010 11:43 AM, Amit Saxena wrote: > > > > On Tue, Nov 23, 2010 at 10:09 PM, shawn wilson > > > > <mailto:ag4ve.us%4

Re: Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread Amit Saxena
On Tue, Nov 23, 2010 at 10:09 PM, shawn wilson wrote: > Well, each new ssh connection should spawn a new process so you could look > at it from that end. More technically, you could look into netstat or lsof > modules. > On Nov 23, 2010 11:31 AM, "Amit Saxena" wrote: >

Monitoring ssh connectivity to a server using perl !

2010-11-23 Thread Amit Saxena
ctive perl on windows or part of perl distribution of linux / solaris). Can we do it via "IO::Socket::INET" ? Thanks & Regards, Amit Saxena

How to copy and execute a file from source host to a remote windows system using perl ?

2010-10-28 Thread Amit Saxena
st is part of, is known. The source host can be considered either as *nix host or windows host. Thanks & Regards, Amit Saxena

Re: [PBML] Help needed in recursion with objects in perl !

2010-08-07 Thread Amit Saxena
On Fri, Aug 6, 2010 at 8:09 PM, Randal L. Schwartz wrote: > >>>>> "Amit" == Amit Saxena writes: > > Amit> I am working on a tree implementation (with any number of parent > Amit> and child nodes) in perl. Every node is defined as a object of a > Ami

Help needed in recursion with objects in perl !

2010-08-06 Thread Amit Saxena
tation using different design. I tried looking for modules on CPAN which supports tree implementation with multiple parents and child but couldn't find it. Note : For some reasons, I don't want to use implementation which requires "$_". Thanks & Regards, Amit Saxena

Re: How to become a perl architect !

2010-07-02 Thread Amit Saxena
On Fri, Jul 2, 2010 at 9:41 PM, Peter Scott wrote: > On Fri, 02 Jul 2010 09:34:05 +0000, Amit Saxena wrote: > > I have around 6+ years of IT experience as a software development > > mailing in scripting technologies using perl. > > > > I want to become technical archit

Re: How to become a perl architect !

2010-07-02 Thread Amit Saxena
On Fri, Jul 2, 2010 at 11:26 AM, Chas. Owens wrote: > On Fri, Jul 2, 2010 at 05:56, Amit Saxena wrote: > snip > >> > On perl, I have mainly experience on text handling and processing. > snip > > I am not planning to stop working as a developer, however apart from my &

Re: How to become a perl architect !

2010-07-02 Thread Amit Saxena
On Fri, Jul 2, 2010 at 9:48 AM, Shlomi Fish wrote: > On Friday 02 Jul 2010 12:34:05 Amit Saxena wrote: > > Hi all, > > > > I have around 6+ years of IT experience as a software development mailing > > in scripting technologies using perl. > > > > I wan

How to become a perl architect !

2010-07-02 Thread Amit Saxena
have mainly experience on text handling and processing. Thanks & Regards, Amit Saxena

How to find the status, i.e. "next run time" and "last run time", of a task which is run through windows task scheduler !

2010-06-08 Thread Amit Saxena
Hi all, I want to know how to find the status, i.e. "next run time" and "last run time", of a task which is run through windows task scheduler. This is required so as to find out instances where a task gets "hanged" after run through windows task scheduler. Thanks & Regards, Amit Saxena

Developing Complex Event Processing (CEP) applications in perl

2010-05-11 Thread Amit Saxena
. Thanks & Regards, Amit Saxena

Re: Can we perform substitution to the matched pattern inside a regular expression so that the modified pattern gets returned instead of earlier matched one ?

2010-05-05 Thread Amit Saxena
On Fri, Apr 30, 2010 at 10:40 PM, C.DeRykus wrote: > On Apr 30, 3:55 am, learn.tech...@gmail.com (Amit Saxena) wrote: > > Hello everybody, > > > > Can we perform substitution to the matched pattern inside a regular > > expression so that the modified pattern gets

Can we perform substitution to the matched pattern inside a regular expression so that the modified pattern gets returned instead of earlier matched one ?

2010-04-30 Thread Amit Saxena
r...@host1 ~]# perl check.pl text1 is [hello~~~how~~~are~~~you~~~fine?~~~OK] regex1 is [(?-xism:^([^~]+)~~~([^~]+)(?:~~~){0,1}(.*)~~~([^~]+)$)] Regular expression matched Field 1 : [hello] Field 2 : [how] Field 3 : [are~~~you~~~fine?] Field 4 : [OK] [r...@host1 ~]# == Thanks & Regards, Amit Saxena

Re: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Amit Saxena
is up. Thanks & Regards, Amit Saxena On Tue, Jul 21, 2009 at 5:24 AM, Bob McConnell wrote: > From: Amit Saxena > > > > The client for which I am working will not allow any external utility / > > modules to be installed on their development / production environments. >

Re: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Amit Saxena
Thanks Thomas, I will surely look at mon to know about how to write monitoring code in Perl. Thanks & Regards, Amit Saxena On Tue, Jul 21, 2009 at 5:25 AM, Thomas Bätzler wrote: > Amit Saxena wrote: > > Hi Thomas, > > > > Thanks for the response. > > > > T

Re: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Amit Saxena
Hi Thomas, Thanks for the response. The client for which I am working will not allow any external utility / modules to be installed on their development / production environments. Moreover they want the solution implemented using Perl only. Thanks & Regards, Amit Saxena On Tue, Jul 21, 200

How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Amit Saxena
re a way to implement a daemon sort of a thing in Perl which will continuously listen at one port and proactively monitor the "ping" state of the server ? 2. I have heard about SNMP and also know about perl Net::SNMP and SNMP modules. Will they be of any help here ? Thanks & Regards, Amit Saxena

Re: Finding out matching and not matching entries between two files !

2009-07-16 Thread Amit Saxena
rds, Amit Saxena On Thu, Jul 16, 2009 at 7:18 AM, Jim Gibson wrote: > At 2:12 AM -0700 7/16/09, Amit Saxena wrote: > >> Hi all, >> >> I need help regarding the approach to find out matched and unmatched >> entries >> between two files using perl. >> >>

Finding out matching and not matching entries between two files !

2009-07-16 Thread Amit Saxena
once there is a difference in country and state pair, I find out all records in superset file which satisfies matching and unmatching condition. Please suggest a better approach for the same. Thanks & Regards, Amit Saxena

Re: How to login from one system (A) into remote system (B) and do a ping to the third system (C) with Perl and CGI !

2009-04-12 Thread Amit Saxena
agement with it and, of course, perl:) > > -Original Message- > From: kevin liu [mailto:lwtben...@gmail.com] > Sent: Friday, April 10, 2009 10:13 > To: Amit Saxena > Cc: Perl Beginners > Subject: Re: How to login from one system (A) into remote system (B) and > do a

How to login from one system (A) into remote system (B) and do a ping to the third system (C) with Perl and CGI !

2009-04-01 Thread Amit Saxena
s over there. However I am looking for any built-in module for the same as the administrators will not allow external modules to be installed in production environment. Thanks & Regards, Amit Saxena

How to implement "tail -f" using perl in both windows and linux !

2009-03-23 Thread Amit Saxena
Is it possible to implement this without using any external modules from CPAN ? Thanks & Regards, Amit Saxena

Re: Recursive regular expression not working !

2008-12-24 Thread Amit Saxena
On Wed, Dec 24, 2008 at 7:11 PM, Mr. Shawn H. Corey wrote: > On Wed, 2008-12-24 at 11:40 +0530, Amit Saxena wrote: > > Hi all, > > > > I am trying to use recursive regular expression in Perl. > > > > I am using an example from > http://www.perl.com/pub/a/2003/

Recursive regular expression not working !

2008-12-23 Thread Amit Saxena
Hi all, I am trying to use recursive regular expression in Perl. I am using an example from http://www.perl.com/pub/a/2003/06/06/regexps.html. Whenever I try to execute the program, it hangs and I have to do a CNTRL-C to break it. Please let me know where I am wrong. *# cat t_r.pl* #! /usr/bin

Re: Ways to get a mapping of values versus keys in a hash where there is one-to-one mapping between the keys and the values !

2008-11-25 Thread Amit Saxena
On Tue, Nov 25, 2008 at 10:59 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > Amit Saxena wrote: > > Hi all, > > > > I recently had one requirement where I needed to get the key in a hash on > > the basis of supplied value. > > > > There is one additional

Ways to get a mapping of values versus keys in a hash where there is one-to-one mapping between the keys and the values !

2008-11-25 Thread Amit Saxena
as initialized from the Hash h1 is printed below :- S South W West C Central N North E East The Array arr2 as initialized from the reverse of the Array arr1 is printed below :- East E North N Central C West W South S The Hash h2 as initialized from the Array arr2 is printed below :- [West] => [W] [Central] => [C] [South] => [S] [North] => [N] [East] => [E] *Prompt #* Thanks & Regards, Amit Saxena

Re: How to determine the file type of a file passed as an input to the perl program ?

2008-11-20 Thread Amit Saxena
On Thu, Nov 20, 2008 at 6:59 PM, Raymond Wan <[EMAIL PROTECTED]>wrote: > > Hi Amit, > > > Amit Saxena wrote: > >> On Thu, Nov 20, 2008 at 6:20 PM, Raymond Wan <[EMAIL PROTECTED] >> >wrote: >> >> >>> Hi Amit, >>> >&g

Re: How to determine the file type of a file passed as an input to the perl program ?

2008-11-20 Thread Amit Saxena
On Thu, Nov 20, 2008 at 6:20 PM, Raymond Wan <[EMAIL PROTECTED]>wrote: > > Hi Amit, > > > Amit Saxena wrote: > >> Using external modules in the home directory is not disallowed, in fact I >> keep using few CPAN modules from my home directory like PerlTidy etc.

Re: How to determine the file type of a file passed as an input to the perl program ?

2008-11-20 Thread Amit Saxena
On Thu, Nov 20, 2008 at 5:50 PM, Raymond Wan <[EMAIL PROTECTED]>wrote: > > Hi Amit, > > > Amit Saxena wrote: > >> On Thu, Nov 20, 2008 at 4:59 PM, Raymond Wan <[EMAIL PROTECTED] >> >wrote: >> >> >>> Hi Amit, >>> >>>

Re: How to determine the file type of a file passed as an input to the perl program ?

2008-11-20 Thread Amit Saxena
On Thu, Nov 20, 2008 at 4:59 PM, Raymond Wan <[EMAIL PROTECTED]>wrote: > > Hi Amit, > > Amit Saxena wrote: > >> Hi all, >> >> How to determine the file type of a file passed as an input to the perl >> program ? >> >> I want to hav

How to determine the file type of a file passed as an input to the perl program ?

2008-11-20 Thread Amit Saxena
Hi all, How to determine the file type of a file passed as an input to the perl program ? I want to have the same output as it's shown by "file" command in UNIX. Thanks & Regards, Amit Saxena

Re: Difference between passing "?" versus ":1", ":2", ":3" etc in prepare in Perl DBI !

2008-11-02 Thread Amit Saxena
On Mon, Nov 3, 2008 at 11:43 AM, Chas. Owens <[EMAIL PROTECTED]> wrote: > On Mon, Nov 3, 2008 at 00:58, Amit Saxena <[EMAIL PROTECTED]> wrote: > > Hi > > > > What's the difference between passing "?" versus ":1", ":2", &

Difference between passing "?" versus ":1", ":2", ":3" etc in prepare in Perl DBI !

2008-11-02 Thread Amit Saxena
, :2, :3)"); $sth->execute($var1,$var2,$var3); *Scenario 2* $sth = $dbh->prepare("insert into tablename values (?, ?, ?)"); $sth->execute($var1,$var2,$var3); Thanks & Regards, Amit Saxena

Issue with references and array slice with one member !

2008-10-31 Thread Amit Saxena
else { print ""; } if (defined ${$row}[1]) { print "<${$row}[1]>"; } else { print ""; } if (defined ${$row}[2]) { print "<${$row}[2]>"; } else { print ""; } print "\n"; } Disconnect #$dbh->disconnect; You have mail in /var/spool/mail/root # Thanks & Regards, Amit Saxena

Re: How to create a timezone converter application in Perl !

2008-09-26 Thread Amit Saxena
On Fri, Sep 26, 2008 at 7:39 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > Amit Saxena wrote: > > > > Recently I came across a scenario where I need to convert the time from > one > > timezone to another. > > > > Though that time, I used few websites for t

How to create a timezone converter application in Perl !

2008-09-26 Thread Amit Saxena
orldclock/meetingdetails.html?year=2008&month=9&day=25&hour=4&min=0&sec=0&p1=234&p2=771>Wed 9:00 PM *Thu 9:30 AM Thanks & Regards, Amit Saxena

Re: any errors in this perl module?

2008-09-26 Thread Amit Saxena
71059891 > > [EMAIL PROTECTED] > > > > > DISCLAIMER > == > This e-mail may contain privileged and confidential information which is > the property of Persistent Systems Ltd. It is intended only for the use of > the individual or entity to which it is addressed. If you are not the > intended recipient, you are not authorized to read, retain, copy, print, > distribute or use this message. If you have received this communication in > error, please notify the sender and delete all copies of this message. > Persistent Systems Ltd. does not accept any liability for virus infected > mails. > Yes, The last line in a perl module should be "1;" Regards, Amit Saxena

Re: 32 bit computation problems with Perl !

2008-09-16 Thread Amit Saxena
On Tue, Sep 16, 2008 at 7:07 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Amit Saxena wrote: > >> On Tue, Sep 16, 2008 at 5:04 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: >> >>> >>> Amit Saxena wrote: >>> >>>> >&g

Re: 32 bit computation problems with Perl !

2008-09-16 Thread Amit Saxena
On Tue, Sep 16, 2008 at 5:04 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Amit Saxena wrote: > >> Hi all, >> > > Hello, > > In the following code, the value of "$string" in last two cases is not >> printed correctly. >> >> Pl

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
On Fri, Sep 12, 2008 at 10:52 AM, dan <[EMAIL PROTECTED]> wrote: > On Fri, 12 Sep 2008 10:24:58 +0530, Amit Saxena wrote: > > > The only issue with this approach is that two queries needs to be run > > for the same. > > > > Considering the tables containing

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
On Fri, Sep 12, 2008 at 9:53 AM, dan <[EMAIL PROTECTED]> wrote: > On Thu, 11 Sep 2008 17:23:22 +0530, Amit Saxena <[EMAIL PROTECTED]> > wrote: > > > Hi all, > > > > I am looking for a "fetch" function to fetch "n" number of records a

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
On Fri, Sep 12, 2008 at 9:36 AM, Raja Vadlamudi <[EMAIL PROTECTED]> wrote: > > > On Thu, Sep 11, 2008 at 11:12 PM, Amit Saxena <[EMAIL PROTECTED]>wrote: > >> On Fri, Sep 12, 2008 at 12:01 AM, Dr.Ruud >> <[EMAIL PROTECTED] <[EMAIL PROTECTED]>< >

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
On Fri, Sep 12, 2008 at 12:01 AM, Dr.Ruud <[EMAIL PROTECTED]<[EMAIL PROTECTED]> > wrote: > "Amit Saxena" schreef: > > Dr.Ruud: > >> jm: > > >>> there is a LIMIT option for the SELECT statement that will return > >>> the number of

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
MAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > > What about the scenario when the table is accessed in a read-only mode ? Also I want to know whether the subsequent calls to fetchrow_array will actually fetch the next LIMIT records or the current LIMIT one. Regards, Amit Saxena

Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
nt to the output file print PTR %arr1; } } Thanks & Regards, Amit Saxena

Re: Difference between "perl -w" and "use warnings" in perl !

2008-09-01 Thread Amit Saxena
On Mon, Sep 1, 2008 at 6:39 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > Amit Saxena wrote: > > > > What's the difference between "perl -w" and "use warnings" in perl ? > > > > If there is no difference, then the "use warnings" can

Difference between "perl -w" and "use warnings" in perl !

2008-09-01 Thread Amit Saxena
Hi all, What's the difference between "perl -w" and "use warnings" in perl ? If there is no difference, then the "use warnings" can be removed from the perl programs and replace them with "perl -w".of removing "use warnings". Thanks & Regards, Amit Saxena

Re: return sorted hashes from subroutines

2008-08-29 Thread Amit Saxena
{ '6' => '1', '7' => '2', '5' => '1' } }; ==>B 5 8 $VAR1 = { 'A' => { '6' => '1', '7' => '2', '5' => '1' }, 'B' => { '5' => '8' } }; ==>B 6 9 $VAR1 = { 'A' => { '6' => '1', '7' => '2', '5' => '1' }, 'B' => { '6' => '9', '5' => '8' } }; Original File :- A5 1 A5 1 A5 1 A6 1 A7 2 B5 8 B6 9 New File :- A,6,1 A,7,2 A,5,1 B,6,9 B,5,8 *#* Regards, Amit Saxena

Re: Perl and "vi" (not "vim") , ctags like feature in Perl !

2008-08-26 Thread Amit Saxena
On Mon, Aug 25, 2008 at 9:03 PM, anders <[EMAIL PROTECTED]> wrote: > On 25 Aug, 16:32, [EMAIL PROTECTED] (Amit Saxena) wrote: > > Hi all, > > > >- I am using Perl 5.8.4 and "vi" (not "vim") on Solaris 9. > > > > While developing my Pe

Perl and "vi" (not "vim") , ctags like feature in Perl !

2008-08-25 Thread Amit Saxena
to access Oracle 10g. Shifting between the sessions is tough sometimes. Is there a possibility where I can customize "vi" for some shortcuts for at least running Perl programs or accessing sqlplus session ? - Is there a ctags like facility for Perl as well ? Thanks & Regards, Amit Saxena

Re: About the error message in Perl : "Missing right curly braces"

2008-08-21 Thread Amit Saxena
On Thu, Aug 21, 2008 at 5:23 PM, Peter Scott <[EMAIL PROTECTED]> wrote: > On Thu, 21 Aug 2008 14:31:07 +0530, Amit Saxena wrote: > > Assuming you are getting the buggy code for the first time and you need > to > > track which line contains that curly brace which is causin

Re: About the error message in Perl : "Missing right curly braces"

2008-08-21 Thread Amit Saxena
On Thu, Aug 21, 2008 at 2:44 PM, Stewart Anderson < [EMAIL PROTECTED]> wrote: >-- > > *From:* Amit Saxena [mailto:[EMAIL PROTECTED] > *Sent:* 21 August 2008 10:01 > *To:* Stewart Anderson > *Cc:* Perl > *Subject:* Re: About the error

Re: About the error message in Perl : "Missing right curly braces"

2008-08-21 Thread Amit Saxena
On Thu, Aug 21, 2008 at 2:23 PM, Stewart Anderson < [EMAIL PROTECTED]> wrote: > > > -Original Message- > > From: Amit Saxena [mailto:[EMAIL PROTECTED] > > Sent: 21 August 2008 08:56 > > To: Perl > > Cc: Amit Saxena > > Subject: About the

About the error message in Perl : "Missing right curly braces"

2008-08-21 Thread Amit Saxena
nd it took me nearly 1.5 hours to find out the exact line where the problem is. Thanks & Regards, Amit Saxena

Oraperl and DBI !

2008-08-14 Thread Amit Saxena
I have read somewhere in web that Oraperl is a wrapper around DBI. To the best of my knowledge, I think that's not true because of following reasons :- 1. Oraperl was much older compared to DBI 2. Not all DBI functions are available with Oraperl ! Please confirm. Thanks & Regards, Amit Saxena

Complete program execution trace in Perl !

2008-08-12 Thread Amit Saxena
is to use debugger but that's highly interactive. Though Perl DBI allows embedding Perl DBI trace statements at various places in the program, it requires changes to the complete program which I don't want to do. Thanks & Regards, Amit Saxena

Re: DBI equivalent of Oraperl ora_titles function !

2008-08-05 Thread Amit Saxena
On Tue, Aug 5, 2008 at 6:06 PM, Peter Scott <[EMAIL PROTECTED]> wrote: > On Tue, 05 Aug 2008 09:38:41 +0530, Amit Saxena wrote: > > > What's the DBI equivalent of Oraperl ora_titles function ? > > > > I need it because I want to get the titles (column names) of

Re: Substitution within an html page

2008-08-04 Thread Amit Saxena
my $str; while (chomp($str = )) { $str =~ s/value=src/\/home\/usr\/test\//g; print HTMLFILE1 "$str\n"; } close (HTMLFILE1); close (HTMLFILE); Regards, Amit Saxena

DBI equivalent of Oraperl ora_titles function !

2008-08-04 Thread Amit Saxena
Hi all, What's the DBI equivalent of Oraperl ora_titles function ? I need it because I want to get the titles (column names) of a select query into an array without fetching the row values from the database. Thanks & Regards, Amit Saxena

Code not working as desired !

2008-08-01 Thread Amit Saxena
root]# perl k1.pl Matrix is as follows :- Row = 1 2 3 a b Row = 4 5 6 c d Row = 7 8 9 e f Hash is as follows :- Key -> [4] : Value -> [5 6 c d] Key -> [1] : Value -> [2 3 a b] Key -> [7] : Value -> [8 9 e f] [root]# Thanks & Regards, Amit Saxena

Difference between "=>" and ">=" in Perl !

2008-07-23 Thread Amit Saxena
print "\nInside If"; } else { print "\nInside Else"; } print "\n==="; if ($i => 5) { print "\nInside If"; } else { print "\nInside Else"; } print "\n"; $ perl y.pl Useless use of private variable in void context at y.pl line 26. Inside If === Inside If [EMAIL PROTECTED]:~]$ Thanks & Regards Amit Saxena

Re: DBI error

2008-07-21 Thread Amit Saxena
driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the > DBI_DRIVER env var is not set) at quickPerl.pl line 8 > > I have MySQL server installed and it works well with other applications. > > Thanks for help! > Is it because you have not specified the database name in the following connect statement :- use DBI; my $dbh = DBI -> connect ( "dbi:mysql", $adm, $pass ) ; Regards, Amit Saxena

Re: Strange sorting, need some help

2008-07-21 Thread Amit Saxena
order, > which > is different from numeric order if the numbers have the same number of > digits. > So 2 is greater than 11 in the same way that 'B'is greater than 'AA'. > > I'm not clear what you mean by "the sorting is done correctly, but the > positions > aren't", but I hope that helps? > > Rob > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > > Hi Rob That means you want to mention that always use "cmp" instead of "<=>" for any kind of data, numeric or non-numeric. Regards, Amit Saxena

Re: how to convert data available from excel to hash?

2008-07-20 Thread Amit Saxena
L PROTECTED] > http://learn.perl.org/ > > > If the data is not very complicated, convert the excel into .csv file and then read that file line by line to convert into a hash. Regards, Amit Saxena

Re: Foreach with array of hashes

2008-07-19 Thread Amit Saxena
n subroutine that has been tested and it works (:-) Line 14:ðernetGlobalMode ($snmpS); Line 15: }* Let us know in case you are facing more problems. Regards, Amit Saxena

Re: Parsing XML

2008-07-19 Thread Amit Saxena
at do you need to do with the data? It may be possible with regular > expressions if the data is consistently formatted. > > Rob > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > > Hi ! I am using use XML::SAX::ParserFactory . I want to know whether it's a better alternative than suggested so far in this thread or not ? If not, please suggest. Regards, Amit Saxena

Re: How can we Install Perl in Windows

2008-07-17 Thread Amit Saxena
on windows platform, more people are using it with ActiveState rather than Cygwin. I might be wrong though. Regards, Amit Saxena

Re: How can we Install Perl in Windows

2008-07-17 Thread Amit Saxena
eously help others but everybody expects the person who raises the query to do some initial basic searching on the internet. Have said that, in case you have more queries, send it to the mailing list. Regards, Amit Saxena

Re: Compare Excel file

2008-07-16 Thread Amit Saxena
I still say, converting the excel files in .csv format and then comparing is not a bad solution. Regards, Amit Saxena On Thu, Jul 17, 2008 at 9:43 AM, Sivasakthi <[EMAIL PROTECTED]> wrote: > Dr.Ruud wrote: > >> Sivasakthi schreef: >> >> >> >>> Is it

Re: A newbie question - line number inside the script

2008-07-16 Thread Amit Saxena
script itself. > > Can someone assist please ? > > Thanks in advance, > > Amit. > If you are referring to process ID by "number", you can use $$ for that. Regards, Amit Saxena

Re: Compare Excel file

2008-07-15 Thread Amit Saxena
What about this approach where we convert two excel files in .csv format and then compare those two files ? Regards, Amit Saxena On Tue, Jul 15, 2008 at 4:33 PM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Sivasakthi wrote: > >> Gunnar Hjalmarsson wrote: >> >>&

Re: how to read the formatted data from the file?

2008-07-14 Thread Amit Saxena
oops I was thinking along "C" lines on that one ! Please remove sscanf part from the loop. Regards Amit Saxena On Tue, Jul 15, 2008 at 2:29 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Brad Baxter wrote: > > Amit Saxena wrote: > >> #! /usr/bin/perl &g

Re: how to read the formatted data from the file?

2008-07-14 Thread Amit Saxena
#! /usr/bin/perl use warnings; use strict; open (PTR1, ")) { sscanf($str, "%5d %11.2f", $data1, $data2); # do whatever processing. } close (PTR1); Regards, Amit Saxena On Mon, Jul 14, 2008 at 8:23 PM, vikingy <[EMAIL PROTECTED]> wrote: > Hi all, >

Re: Perl script doesnt behave well

2008-07-14 Thread Amit Saxena
modifiy $sth->execute(); with $num_rows = $sth->execute() or die "Unable to call execute $!\n\n"; Regards, Amit Saxena On Mon, Jul 14, 2008 at 6:30 PM, luke devon <[EMAIL PROTECTED]> wrote: > could you please direct me how could I implement t

Re: Perl script doesnt behave well

2008-07-14 Thread Amit Saxena
Try pasting some input record for which the output is not coming. If the record contains confidential data, you can mask the data. Regards, Amit Saxena On Mon, Jul 14, 2008 at 3:43 PM, luke devon <[EMAIL PROTECTED]> wrote: > Hi, > > I am using perl script to handle some fu

Re: fetching encrypted passwords for oracle username in Perl !

2008-07-14 Thread Amit Saxena
isted below but none of them is the best :- - *Put username and password through environment variable* : bad idea to use environment variables here - *Ask at runtime* : I would like my application to run without user input at runtime. Regards, Amit Saxena On Mon, Jul 14, 2008 at 3:0

fetching encrypted passwords for oracle username in Perl !

2008-07-14 Thread Amit Saxena
Hi Instead of hard-coded passwords in my source code or an input file, I would like to enable some sort of encryption through some keys for all the usernames in Oracle 10g. Please let me know how to do that with Perl DBI ? Thanks & Regards, Amit Saxena

Re: Get Clients Windows Logon ID

2008-07-11 Thread Amit Saxena
Using environment variables to find username are risky ! Is there any API available for the same ? Thanks & Regards, Amit Saxena On Fri, Jul 11, 2008 at 8:39 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > Hi All, > > > > Can y

Re: Count of number of rows returned in delete / update sql in Perl DBI ?

2008-07-10 Thread Amit Saxena
the query. Regards, Amit Saxena On Thu, Jul 10, 2008 at 8:12 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Amit Saxena wrote: > > Hi all, > > > > I want to know how to get the count of number of rows returned in delete > / > > update sql in Perl DBI ? >

Count of number of rows returned in delete / update sql in Perl DBI ?

2008-07-10 Thread Amit Saxena
base. Is there any solution which will surely work on all databases ? Thanks & Regards, Amit Saxena

Certification in Perl

2008-07-09 Thread Amit Saxena
Hi I would like to know is there any Perl specific certification which I can look forward to ? Note :- I was not sure to which mailing list should this query be sent, please let me know in case I have to send it to a different group / mailing list etc. Regards, Amit Saxena

Freelance opportunities in Perl !

2008-07-08 Thread Amit Saxena
also interested in the same. Note :- I was not sure to which mailing list should this query be sent, please let me know in case I have to send it to a different group / mailing list etc. Regards, Amit Saxena

Re: how to read the last line of a file directly?

2008-07-06 Thread Amit Saxena
Hi Though I am not very sure, but can we use inbuilt seek function in perl ? Regards, Amit Saxena On Mon, Jul 7, 2008 at 12:39 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > loody wrote: > > > > I try to read the last line of a file directly instead of using > > while(&l

Re: removing '*' from *****STAFF*****

2008-07-03 Thread Amit Saxena
Hi Rajnikant, That removes the character "*" for everywhere whereas the requirement is only to remove from the beginning and trailing parts of the string. Regards, Amit Saxena On Thu, Jul 3, 2008 at 11:19 AM, Rajnikant < [EMAIL PROTECTED]> wrote: > Try out this, > >

Re: simplify a path

2008-07-02 Thread Amit Saxena
Hi I agree that the code has some flaws in that. Infact immediately after posting my solution, I thought of your test case only. If I will get some time, I will work on the same and let you know. Thanks for the feedback. Regards, Amit Saxena On Wed, Jul 2, 2008 at 8:08 PM, Chen Yue <[EM

Re: simplify a path

2008-07-02 Thread Amit Saxena
--- str = [/a/b/./c/../d] str1 = [/a/b/d] --- Have a nice day !!! Regards, Amit Saxena On Wed, Jul 2, 2008 at 7:03 PM, Chen Yue <[EMAIL PROTECTED]> wrote: > Hi > > I have a file containing UNIX-styled Path in each line. But the path is &g

Re: Re: Re: @INC and cross-platform path usage

2008-07-02 Thread Amit Saxena
struct - use *Find::Bin* module What others say ? Regards, Amit Saxena On Wed, Jul 2, 2008 at 2:32 PM, Tobias Eichner <[EMAIL PROTECTED]> wrote: > I wrote the following script that fits my needs; maybe someone finds it > useful, maybe someone finds an error in it (if so, let me know

Re: about Zlib

2008-07-02 Thread Amit Saxena
that. Regards, Amit Saxena On Wed, Jul 2, 2008 at 12:43 PM, Rajnikant < [EMAIL PROTECTED]> wrote: > Thanks for replying Jeff. > But can we use Zlib for same? > > > > Rajnikant Jachak | Software Engg | Persistent Systems Limited > [EMAIL PROTECTED] | Cell: +91 9822204088

Re: user id validation

2008-07-01 Thread Amit Saxena
he allowed ones and the script will work. I feel the better way is to use system command and call "whoami" or "id" command. Regards, Amit Saxena On Wed, Jul 2, 2008 at 10:30 AM, Rajnikant < [EMAIL PROTECTED]> wrote: > > I think Work around for this is, > &g

Re: about perl module uninstallation

2008-07-01 Thread Amit Saxena
Is there a way to convert the perl packages from CPAN to binary packages in linux like rpm etc. This way, it's easy for installation, uninstallation of the modules. On Tue, Jul 1, 2008 at 9:52 PM, Randal L. Schwartz <[EMAIL PROTECTED]> wrote: > > "Telemachus" == Telemachus <[EMAIL PROTECTED

Re: @INC and cross-platform path usage

2008-07-01 Thread Amit Saxena
You can also set the environment variable PERL5LIB to whatever directory that contains your custom library files. Regards, Amit Saxena On Tue, Jul 1, 2008 at 6:32 PM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Tobias Eichner wrote: > >> I have created a Perl library that

Re: substitution

2008-07-01 Thread Amit Saxena
osefully incorporate double quotes, then I need $1. Regards, Amit Saxena On Tue, Jul 1, 2008 at 4:19 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Amit Saxena wrote: > >> Why don't use perl "s" operator with "e" option ? >> >> $str =~

Re: Array problem

2008-07-01 Thread Amit Saxena
use $*dbh*->*quote*($str) On Tue, Jul 1, 2008 at 4:59 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Beyza wrote: > >> I have an array which has strings like; >> >> John's House >> Bla bla; >> etc, >> >> When I use them in an SQL query, perl gives an error. So, I need to >> put escape chara

Re: substitution

2008-07-01 Thread Amit Saxena
Why don't use perl "s" operator with "e" option ? $str =~ s/([^ ]+)/$hash{\1}/ge Regards, Amit Saxena On Tue, Jul 1, 2008 at 3:57 AM, Brad Baxter <[EMAIL PROTECTED]> wrote: > On Jun 30, 4:20 pm, [EMAIL PROTECTED] (Epanda) wrote: > > Hi, > > >

Re: How can I translate it back to @ sign.

2008-06-30 Thread Amit Saxena
ven that is also cumbersome if there are many lines and many control charcters. Regards, Amit Saxena On Mon, Jun 30, 2008 at 7:05 PM, Aruna Goke <[EMAIL PROTECTED]> wrote: > Amit Saxena wrote: > >> Try >> >> $email =~ s/[[:cntrl:]]/@/g; >> >> inst

Re: Automation

2008-06-30 Thread Amit Saxena
You can even refer to free task schedules for windows on the web. Have a look at http://www.snapfiles.com/freeware/ You also can go for cygwin on Windows. On Mon, Jun 30, 2008 at 8:18 PM, Bob McConnell <[EMAIL PROTECTED]> wrote: > In MS-Windows, take a look at the Task Scheduler to see if it ca

Re: How can I translate it back to @ sign.

2008-06-30 Thread Amit Saxena
Try $email =~ s/[[:cntrl:]]/@/g; instead of $email =~ s/!/@/g; Infact try this in the entire file. Note :- This is on the assumption that there are no other control characters in the input file. On Fri, Jun 27, 2008 at 2:51 AM, Aruna Goke <[EMAIL PROTECTED]> wrote: > David Romero wrote: > >>

Re: I could not do it with matlab could perl do it?

2008-06-30 Thread Amit Saxena
$str= 'GO:022 0.00312066574202497 9/2884 1/597 0.0023457 NAmitotic spindle elongation YBL084C ' (undef, undef, undef, $var1, $var2) = split (/\s*/, $str); On Wed, Jun 25, 2008 at 1:20 PM, fadlyemen <[EMAIL PROTECTED]> wrote: > Hi All > I could not do it with matlab could perl do it? >

  1   2   >