How to get the values

2007-06-20 Thread Nath, Alok (STSD)
Hi, I have a file from which I have to pick a line like this and get the values of Par, Default and RootOnly. Par=som Default=yes RootOnly=no Shared=force I am trying something like below.But the code is becoming long. Anything simplistic will help.

RE: How to get the values

2007-06-20 Thread Nath, Alok (STSD)
Thanks .It serves the purpose. -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 20, 2007 12:42 PM To: beginners@perl.org Cc: Nath, Alok (STSD) Subject: Re: How to get the values Nath, Alok (STSD) wrote: Hi, I have a file from which I have

Reading a particular line from a file

2007-06-20 Thread Nath, Alok (STSD)
Hi, Is it possible to read a particular line by line number ? For e.g reading line 3 from a file. I don't want to read each line and count. Thanks Alok -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Declaring constants in perl

2007-06-08 Thread Nath, Alok (STSD)
Hi, What is the convention used to declare constants in perl ? In C we declare constant type in Capital letters , not sure how its in perl. Regards, Alok -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: Simplest hash initialization with no value

2007-06-01 Thread Nath, Alok (STSD)
Thanks Jeff. -Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 3:21 PM To: Nath, Alok (STSD) Cc: beginners@perl.org Subject: Re: Simplest hash initialization with no value Nath, Alok (STSD) 写道: Hi, What is the simplest way to initialize

RE: Simplest hash initialization with no value

2007-06-01 Thread Nath, Alok (STSD)
PM To: Nath, Alok (STSD) Cc: beginners@perl.org Subject: Re: Simplest hash initialization with no value Nath, Alok (STSD) 写道: Hi, What is the simplest way to initialize the hash keys with no values ? I know the crude form : %myhash =('A' = undef, 'B

Simplest hash initialization with no value

2007-06-01 Thread Nath, Alok (STSD)
Hi, What is the simplest way to initialize the hash keys with no values ? I know the crude form : %myhash =('A' = undef, 'B' = undef) ; Is there anything simpler than this ? Thanks, Alok -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: Simplest hash initialization with no value

2007-06-01 Thread Nath, Alok (STSD)
But when decalared this way it gives a warning message :Use of uninitialized value in concatenation (.) or string at in a print statement which is something like this : my %myhash = map { $_ = undef } qw/A B C D E F G H I J K/; foreach my $key (%myhash){

Problem with Spreadsheet::ParseExcel

2007-05-22 Thread Nath, Alok (STSD)
Hi, When I call use Spreadsheet::ParseExcel in my program I get this error. Weak references are not implemented in the version of perl at C:/Perl/lib/Spreadsheet/ParseExcel.pm line 67 BEGIN failed--compilation aborted at C:/Perl/lib/Spreadsheet/ParseExcel.pm line 67. Compilation failed

Simplification of the code

2007-05-22 Thread Nath, Alok (STSD)
Hi, Can anybody help me to simplify the for loops here ? It parses the excel file. foreach my $col (1..10){ push @row_1, $Sheet-Cells(1, $col)-{'Value'} ; } my @node_names = th([EMAIL PROTECTED]); foreach my $col

Perl plugin for eclipse

2007-05-02 Thread Nath, Alok (STSD)
Hi, Has anybody used any perl plugin for Eclipse ? Please share your thoughts. I am looking for one. Thanks Alok. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Switching io redirection between display and file

2007-04-26 Thread Nath, Alok (STSD)
Hi , Can somebody help me out ? I wanted to switch io redirection between log file and standard display device.Basically sometimes I want to print into a log file and other time to the display device. To redirect I am using this open (STDOUT,

Killing a process created using system

2007-04-25 Thread Nath, Alok (STSD)
Hi, Can I send a kill signal to a process which is created using system call ? Basically I wanted to send a CTRL-C signal to the process created by system call (of course in the same program). Something like this : sub test()

RE: Killing a process created using system

2007-04-25 Thread Nath, Alok (STSD)
, Apr 25, 2007 at 03:12:38PM +0530, Nath, Alok (STSD) wrote: Hi, Can I send a kill signal to a process which is created using system call ? Basically I wanted to send a CTRL-C signal to the process created by system call (of course in the same program

Logging module in RHEL distro

2007-04-25 Thread Nath, Alok (STSD)
Hi, I am using perl which comes with RHEL distribution. I think the perl version is 5.8.5. I am not seeing any modules specific for message logging. Does it have any ? I am prohibited from installing any modules on top of my RHEL. Thanks Alok --

Difference between $ and $$ in function defn

2007-04-11 Thread Nath, Alok (STSD)
Hi, What is the difference between this two function defs ? When there is $ and $$ ?? sub test($$){ ... } sub test($){ ... } Thanks Ak -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

System call

2007-04-10 Thread Nath, Alok (STSD)
Hi, Can somebody explain the difference between this 2 system calls ? system grep 'fred flint' buff system grep, fred flint, buff Thanks Alok -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Calling bash things inside perl script.

2007-04-02 Thread Nath, Alok (STSD)
Hi, Before starting my problem I just want to thank all the active members who had literally mentored me in learning perl. I have bunch of this bash scripts which has lot of functions. I wanted to call and use them in a perl script.I am not sure how to do

RE: Calling bash things inside perl script.

2007-04-02 Thread Nath, Alok (STSD)
; system ((/bin/bash, test)) ; Its throwing this error : Test main /usr/bin/test: /usr/bin/test: cannot execute binary file Regards, Alok. -Original Message- From: Nath, Alok (STSD) Sent: Tuesday, April 03, 2007 10:33 AM To: beginners@perl.org

Need to extract only the function name no brackets reqd.

2007-03-30 Thread Nath, Alok (STSD)
Hi, I have this program which extract function names from the files. My only problem is I want to extract only the function names{no brackets () needed } . Currently its extract all words after word sub but it all returns the parentheses after that. my

RE: Need to extract only the function name no brackets reqd.

2007-03-30 Thread Nath, Alok (STSD)
Jeff, It is returning just 1.I think the result of the expression. -Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Friday, March 30, 2007 2:53 PM To: Nath, Alok (STSD); beginners@perl.org Subject: Re: Need to extract only the function name no brackets reqd

Perl versus other scripting language

2007-03-30 Thread Nath, Alok (STSD)
Hi Perlers ! In my project we are using lot of scripts (for various job launching activities )some written in bash, some in perl.It's completely chaos and not organized. Now we want to revamp the whole scripting framework using some high level scripting

Automating a perl script by another perl script

2007-03-13 Thread Nath, Alok (STSD)
Hi, I have a perl script which prompts user for certain inputs. I want to automate this by creating a separate script which runs the above perl file and probably passing the inputs in a separate text file. Can anybody give me some pointers or how to do this ? Thanks Alok. --

Perl test tools

2007-03-05 Thread Nath, Alok (STSD)
Hi, Is there any open source test frameworks or test tools in perl ? I did some googling and found lot of test tools in other languages but not anything good in perl. Does anybody know about it ? Thanks Alok. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: Perl test tools

2007-03-05 Thread Nath, Alok (STSD)
My requirement is something which run a suite of commands, results reporting. Also remote job launching, getting the results and probably displaying on a web. Something like that. Thanks Alok. -Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007

How to do it in the client side

2006-10-18 Thread Nath, Alok (STSD)
Hi, I want to create a page with certain icons when clicking them should execute certain scripts or commands in the client side. With perl CGI I can create the page but it's executed on the server side . Is there any way by which I can do that in the client side .

File locking issue

2006-08-31 Thread Nath, Alok (STSD)
Hi, I am trying to save data in an xml file. What I am seeing is when I enable the file locking commands the file is completely wiped out.Just zero bytes. But it works correctly when I remove the file locking commands. Please help ?? What I am

Very dangerous code

2006-08-28 Thread Nath, Alok (STSD)
Hi, I have this web page which saves data in an xml. The web page has few textfields which takes input and has a submit button.The data is saved in an XML when pressed the submit button. I am using CGI module for web page and

Designing forms/tables in CGI

2006-08-18 Thread Nath, Alok (STSD)
Hi Guys, My question is can I create more that one form in the same page. If yes , do I need to create separate cgi object for each form or one object for one page is sufficient.How do I design ? Which is advised ? The reason for asking is I have created few

Vertically aligning textfields when using CGI

2006-08-16 Thread Nath, Alok (STSD)
Hi, I am generating a simple form which generates different textfields and scrolling list in different rows. When I display the form what I see is, the different textfields and scrolling list are not aligned vertically. I want the textfields and scrolling list

File locking with XML processing

2006-08-11 Thread Nath, Alok (STSD)
Hi Gurus, Slowly improving my perl skills.Thanx for all your help till now. I have one more query. I have a webpage which has an input form. The input data is stored in an XML.The webpage also processes the XML and displays the data. Few

RE: Writing to XML using XML::Writer

2006-08-10 Thread Nath, Alok (STSD)
is fine. Thanx, Alok -Original Message- From: Robin Norwood [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 09, 2006 8:23 PM To: Nath, Alok (STSD) Cc: beginners@perl.org Subject: Re: Writing to XML using XML::Writer Nath, Alok (STSD) [EMAIL PROTECTED] writes

Writing to XML using XML::Writer

2006-08-09 Thread Nath, Alok (STSD)
Hi, Can anybody give me a simple code snippet which writes or modifies this xml ? my_list guy name=SomeGuy userTom/user date-of-birthAug 2006/date-of-birth /guy guy name=AnotherGuy userDicken/user

Issues in CGI script

2006-08-08 Thread Nath, Alok (STSD)
Hi, I have a table where each cell represents a particular server. Each element in the cell has hyperlinks specified.The hyperlink invokes a script which generates a form and helps user to save and update information. The form has a field like name indicating

Same Internal Server Error from last two days

2006-07-28 Thread Nath, Alok (STSD)
Hi , It's not exactly a perl query but related to it. I am trying to run a Hello World Perl Script in Apache 2.2. My script is installed in location : C:\Program Files\Apache Software Foundation\Apache2.2\bin Perl is installed in : C:\Perl\bin But its constantly giving me Internal

RE: Same Internal Server Error from last two days

2006-07-28 Thread Nath, Alok (STSD)
, Alok (STSD) Cc: beginners@perl.org Subject: Re: Same Internal Server Error from last two days Nath, Alok (STSD) wrote: Hi , It's not exactly a perl query but related to it. I am trying to run a Hello World Perl Script in Apache 2.2. My script is installed in location : C:\Program Files

RE: Same Internal Server Error from last two days

2006-07-28 Thread Nath, Alok (STSD)
02:25 AM, Nath, Alok (STSD) wrote: Ramnish, Here's my Hello World Cgi script which I am trying to run #!/usr/bin/perl print Content-type: text/html\n\n; print Hello, World.; It has no problem. [...] When apache encounters an error, it records it in its error.log. What does the error.log

RE: Same Internal Server Error from last two days

2006-07-28 Thread Nath, Alok (STSD)
Ramnish, I have tried that.No success ... Thanks, Alok. -Original Message- From: Ranish George [mailto:[EMAIL PROTECTED] Sent: Friday, July 28, 2006 5:10 PM To: Nath, Alok (STSD) Cc: Mumia W.; Beginners List Subject: Re: Same Internal Server Error from last two days Nath

RE: Same Internal Server Error from last two days

2006-07-28 Thread Nath, Alok (STSD)
No the script is in C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin. -Original Message- From: Beginner [mailto:[EMAIL PROTECTED] Sent: Friday, July 28, 2006 6:01 PM To: beginners@perl.org Subject: Re: Same Internal Server Error from last two days On 28 Jul 2006 at 14:13,

Modification of table -limited by programming constraint

2006-07-18 Thread Nath, Alok (STSD)
Hi, In my current program I am not sure where to use rowSpan so that I create table like below. In otherwords, I want switch 1 to appear once only for the two rows. My main constraint is I dont want to change the program style to create such a table . Any help will be greatly appreciated.

Want to start remote desktop thru the CGI script

2006-07-04 Thread Nath, Alok (STSD)
Hi, Here's a script which has some two cells in the table.I want to make a change here. What I want is when I click the hyperlink it should run the command 'mstsc IP Address'(instead of telnet) so that I can remote desktop to that machine. Can anybody help me how

RE: Want to start remote desktop thru the CGI script

2006-07-04 Thread Nath, Alok (STSD)
session.The same way it cannot do that ??? Just clarifying.. ~Alok -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Phoenix Sent: Tuesday, July 04, 2006 9:15 PM To: Nath, Alok (STSD) Cc: beginners@perl.org Subject: Re: Want to start remote desktop thru

RE: Want to start remote desktop thru the CGI script

2006-07-04 Thread Nath, Alok (STSD)
the whole thing easier to follow. On Tuesday 04 July 2006 18:38, Nath, Alok (STSD) wrote: What I want to provide is a page with some machine Id's. So once somebody clicks the hyperlinks , it should remote desktop instead of telnet. Is it not possible ? It is not possible

RE: Want to start remote desktop thru the CGI script

2006-07-04 Thread Nath, Alok (STSD)
Thanx Tom, for clarification. ~Alok. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Phoenix Sent: Tuesday, July 04, 2006 10:34 PM To: Nath, Alok (STSD) Cc: beginners@perl.org Subject: Re: Want to start remote desktop thru the CGI script

RE: Trying to add hyperlink

2006-06-23 Thread Nath, Alok (STSD)
Thanx Clarles.This code is really cool. I was looking something like this . -Original Message- From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: Thursday, June 22, 2006 10:22 PM To: beginners@perl.org Subject: RE: Trying to add hyperlink chen li wrote: : How to convert the

RE: Trying to add hyperlink

2006-06-22 Thread Nath, Alok (STSD)
Hi Prabhu, Is there any simple way of doing it.Bcos this looks like user has to type a lot. Perl is known for its simplicity I suppose. Thanx, Alok. -Original Message- From: Prabu [mailto:[EMAIL PROTECTED] Sent: Thursday, June 22, 2006 12:06 PM To: Nath, Alok (STSD) Cc

RE: Trying to add hyperlink

2006-06-22 Thread Nath, Alok (STSD)
: Thursday, June 22, 2006 1:51 PM To: Nath, Alok (STSD) Cc: beginners@perl.org Subject: Re: Trying to add hyperlink Hello Alok, FineBut each box needs to go to different link right.So it should be specified in each box .. If not can u a give me little more detailed requirement like

Trying to add hyperlink

2006-06-21 Thread Nath, Alok (STSD)
Hi, I was trying to add a hyperlink to each of the boxes but it was not putting it in the right place.Can anyone help me in this regard ? #!/usr/bin/perl -w use warnings ; use CGI qw/:standard/; print header, start_html(Stsd ILO Links), h1(Stsd ILO Links) ; print

CGI script not showing the textbox

2006-06-13 Thread Nath, Alok (STSD)
Hi, Need some help to run this script. #!/usr/bin/perl -w use CGI qw(:standard); my $favourite = param(flavour) ; print header; # here's a comment. print the header print start_html(Alok's Page) , h1( Paragraph... !) ; if ($favourite) { print q(Your favourite is :

Function call problem

2006-04-19 Thread Nath, Alok (STSD)
Hi all, Can anybody help me to figure out why the first function call works but the second one is unable to do it. Only difference is I am using DownloadFolder variable to send the value. #FtpVM('test.americas.corp.net', '/1.00/_releases/1_00_00_052',

Unable to read timestamp for remote files

2006-03-10 Thread Nath, Alok (STSD)
Hi, When I try to retrieve the timestamp from a ftp folder I get this error message : Can't call method mtime on an undefined value at func.pl line 69 but the same works in my local machine. My motive is to read the timestamp for each files in the

Find and replace problem

2005-10-06 Thread Nath, Alok (STSD)
Hi, Here's a simple script that is suppose to read a file and changes a particular string. sub ChangeVMConfFile{ open(DATA, +Test.txt) || die Unable to open file ; while(DATA){ if ($_ =~m/Ethernet0.connectionType/){ $_ =~

Error message The process tried to write to a nonexistent pipe.

2005-09-26 Thread Nath, Alok (STSD)
Hi, Any idea why I am getting this error message ? C:\tmp\ScriptsThe process tried to write to a nonexistent pipe. The process tried to write to a nonexistent pipe. The process tried to write to a nonexistent pipe. I am trying to run a dir command in the

Problem reading data from an HTML file

2005-09-14 Thread Nath, Alok (STSD)
Can anyone point out why it is not outputting anything ? It is suppose to read an HTML file and display the table contents. One thing I observed is - It is not entering the for loop and I s not printing anything ( in print Table found at , join(',', $ts-coords), :\n;) #!/usr/bin/perl use

Unable to use XML module

2005-09-05 Thread Nath, Alok (STSD)
Hi all, I am getting this problem while trying to use XML module in my script. Script : #!/usr/bin/perl use XML::Simple ; exit 0 ; Error : Can't locate XML/Simple.pm in @INC (@INC contains:

A small problem

2005-08-22 Thread Nath, Alok (STSD)
Hi Guys, I have this script which reads this text file and splits each line based on comma operator.The strange thing is it is removing the last character from the last word in the last line.So it is not displayed completely. Can anybody tell me why its so ?

Parsing and HTML file and then creating MS-Excel out of it.

2005-08-15 Thread Nath, Alok (STSD)
Hi all, Can anybody send me some pointers for reading an HTML file and then creating an excel file ? Basically what I want to do is read the data in the HTML file and then create and MS-Excel out of it. Thanx, Alok. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional