Re: Redirecting to another url with parameters using post method

2007-08-28 Thread Gunnar Hjalmarsson
Praveena Vittal wrote: Gunnar Hjalmarsson wrote, On 08/27/2007 07:36 PM: Praveena Vittal wrote: #!/usr/bin/perl use CGI; my $query =new CGI; print $query->redirect('http://google.com'); When i run this code How do you run it? Is the script URL in the

Re: Redirecting to another url with parameters using post method

2007-08-28 Thread Praveena Vittal
Please find the part of the code i used for redirection The function below is called when a button is pressed in a cgi page sub do_reactivation() { return if validate_check("Re-Activation",$query->param); my $url = 'https://sustain-54.central/cgi-bin/sams3_portal/activation.cgi'; print $query-

Re: Doubt on Pattern Matching

2007-08-28 Thread Chas Owens
On 8/28/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: > When i write the condition > my @m = $fullStruct =~ /$DLstatement/g; > and try printing the array, > print "\nThe array is @m\n"; > It prints nothing This is the problem... > > Thanks and Regards, > Dharshana snip > > That i

Re: Doubt on Pattern Matching

2007-08-28 Thread Rob Dixon
Dharshana Eswaran wrote: On 8/28/07, Chas Owens <[EMAIL PROTECTED]> wrote: On 8/28/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: I have a pattern, which reads as shown below: my $comment= qr{\s* (?:/\* .*? \*/ \s*)*}xs; my $identifier = qr{ [A-Za-z_]\w* }xs; my $statement = qr{

Re: Redirecting to another url with parameters using post method

2007-08-28 Thread Dr.Ruud
Praveena Vittal schreef: > Gunnar Hjalmarsson: >> If >> you want us to help you debug your code, you need to post a short but >> _complete_ program that exhibits the problem you are having. > > Please find the part of the code i used for redirection > > The function below is called when a button

Re: Redirecting to another url with parameters using post method

2007-08-28 Thread Gunnar Hjalmarsson
Praveena Vittal wrote: Gunnar Hjalmarsson wrote: Praveena Vittal wrote: Gunnar Hjalmarsson wrote, On 08/27/2007 07:36 PM: Praveena Vittal wrote: #!/usr/bin/perl use CGI; my $query =new CGI; print $query->redirect('http://google.com'); When i run this

Read and write operation in serial port

2007-08-28 Thread Saran . j . jegan
Hello, am using win32::serial port for serial communication i can open the port and able to update the settings such as baud rate , parity etc.,but i need to know how to transfer the data through it (read and write), can any give me sound examples -- To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

Accumulating Column Total From a CSV for a Common Key Value

2007-08-28 Thread country
I'm working with 100's of PS Account 'MONTHLY USAGE' Reports. I have been able to parse the reports, do a table lookup to match a Login ID with an Application Name. My output CSV at this point is as follows: Login ID,Application,CPU Minutes,Percent of Total s2pe,CTI Production ,8455,21.7% sybprd0

Re: Get names of files ONLY using module Net::SFTP::Foreign

2007-08-28 Thread salva
Chas Owens wrote: > Be careful, this is Net::SFTP::Foreign, not Net::SFTP. > They are very similar, but there are differences. Well, I should know, as I am the module author ;-) > For instance the ls method > returns an arrayref, not a list in Net::SFTP::Foreign. This means > your code should

Re: Accumulating Column Total From a CSV for a Common Key Value

2007-08-28 Thread Stephen Kratzer
On Monday 27 August 2007 12:36:02 country wrote: > s2pe,CTI Production ,8455,21.7% > sybprd01,OMS,5326,13.7% > pctip01,CTI,5098,13.1% > lxsadr54,CTI,1742,4.5% > pipmp01,SSG-IPM,1742,4.5% > maestro,SSG-RAC-Maestro ,1020,2.6% > f2pa,"DB2DARI  ""stored procedures"" prod",836,2.1% > pomgp01,SSG-PMD-Ome

Re: Accumulating Column Total From a CSV for a Common Key Value

2007-08-28 Thread Gunnar Hjalmarsson
country wrote: Login ID,Application,CPU Minutes,Percent of Total s2pe,CTI Production ,8455,21.7% sybprd01,OMS,5326,13.7% pctip01,CTI,5098,13.1% lxsadr54,CTI,1742,4.5% pipmp01,SSG-IPM,1742,4.5% maestro,SSG-RAC-Maestro ,1020,2.6% f2pa,"DB2DARI ""stored procedures"" prod",836,2.1% pomgp01,SSG-PMD-

Re: Read and write operation in serial port

2007-08-28 Thread Chas Owens
On 8/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, am using win32::serial port for serial communication i can open > the port and able to update the settings such as baud rate , parity > etc.,but i need to know how to transfer the data through it (read and > write), can any give me

Re: manipulating csv file fields through perl

2007-08-28 Thread oryann9
> Something like > #!/usr/bin/perl > use strict; > use DBI; > > my $dbh = > DBI->connect("DBI:CSV:f_dir=/dir/with/the/csvs") > or die "Cannot connect: " . $DBI::errstr; > > $dbh->{'csv_tables'}->{'SomeName'} = { 'file' => > 'SomeName20070827.csv'}; > # tie the table name to the filenam

Re: manipulating csv file fields through perl

2007-08-28 Thread Lawrence Statton
> I read the CPAN module DBD::CSV and still had some > questions. > > 1)Does this create a "in memory" database with data > from the spreadsheet for manipulation? What did reading the source tell you? > > 2)This is really cool! Does anyone have a working > example of inserting, deleting and sub

Re: manipulating csv file fields through perl

2007-08-28 Thread oryann9
--- Lawrence Statton <[EMAIL PROTECTED]> wrote: > > I read the CPAN module DBD::CSV and still had some > > questions. > > > > 1)Does this create a "in memory" database with > data > > from the spreadsheet for manipulation? > > What did reading the source tell you? > > > > > 2)This is really c

Re: manipulating csv file fields through perl

2007-08-28 Thread Chas Owens
On 8/28/07, oryann9 <[EMAIL PROTECTED]> wrote: snip > Thank you for replying but since I am trying to learn > your response did not help much. :( > Any add'l help? snip #!/usr/bin/perl use strict; use warnings; use DBI; my $dbh = DBI->connect( 'DBI:CSV:f_dir=csvdb', #the directory csvdb

IO::Scalar

2007-08-28 Thread Chris
I want to install IO::Scalar. However, I can't find it with the Active Perl's Perl Package Manager. Do this module still exist? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: IO::Scalar

2007-08-28 Thread Chas Owens
On 8/28/07, Chris <[EMAIL PROTECTED]> wrote: > I want to install IO::Scalar. However, I can't find it with the > Active Perl's Perl Package Manager. Do this module still exist? They probably no longer package it because Perl no longer needs it: #!/usr/bin/perl use strict; use warnings; my $no

Re: IO::Scalar

2007-08-28 Thread Chas Owens
On 8/28/07, Chas Owens <[EMAIL PROTECTED]> wrote: > On 8/28/07, Chris <[EMAIL PROTECTED]> wrote: > > I want to install IO::Scalar. However, I can't find it with the > > Active Perl's Perl Package Manager. Do this module still exist? > > They probably no longer package it because Perl no longer ne

Re: File::Find

2007-08-28 Thread Randal L. Schwartz
> "Somu" == Somu <[EMAIL PROTECTED]> writes: Somu> Good sense of humour! Actually i wanted to search for F:/Hindi/RHTDM Somu> and i entered only /Hindi/RHTDM/ Why did you do that? I think you have to enter the full path on Windows. However, I don't run Windows (anywhere!) so I can't actual

Barewood found where operator expected?

2007-08-28 Thread mojorising
Hello! I am trying to write a simple Perl script to edit a file using two other source files named infra_east.txt and infra_west.txt. Please excuse my ignorance on this. I am sure there are much better ways to do what I am doing but this is the best I can come up with on my currently limited knowle

Barewood found where operator expected?

2007-08-28 Thread mojorising
Hello! I am trying to write a simple Perl script to edit a file using two other source files named infra_east.txt and infra_west.txt. Please excuse my ignorance on this. I'm sure there are much smarter ways to achieve what I'm trying to achieve but this is the best I found so far. It's my first tim

How to erase PERL5LIB enviromental variable in Windows XP

2007-08-28 Thread JAYO
When I star my computer with windows XP, and I isssue 'set' in a command windows, PERL5LIB is set, even I don't have now the perl package. Now I want to install another package that says that PERL5LIB is set and it needs not to be for having a clean installation. In the system propieties in environ

Re: Barewood found where operator expected?

2007-08-28 Thread Jeff Pang
2007/8/28, mojorising <[EMAIL PROTECTED]>: > > Here is the script: > perl -i.old -p -e /s/$(cat infra_east.txt)/$(cat infra_west.txt)/ig > configfile.cfg > Not tested it but it seems to be: perl -pi.old -e 's/$(`cat infra_east.txt`)/$(`cat infra_west.txt`)/ig' notice for the `` symbol. -- To

Re: File::Find

2007-08-28 Thread Somu
I write all my programs for my personal use in my PC only, just to learn perl. I will use the code again and tell you, Mr.Randal. Thanks anyway. Actually, i have written something which will get all file and folder names in a given folder matching a regex, but then i want the same subroutine to run

perl load of external librarie (unix/linux)

2007-08-28 Thread Kermit Tensmeyer
most of the time "it" works without any concern at all. I need a reminder of how it normally works under unix/linux with Perl inline and/or XS modules. The modules (built via CPAN and Makefile.PL) built clean (but no make test defined), however on execution I can see from the error that the re

Re: Doubt on Pattern Matching

2007-08-28 Thread Dharshana Eswaran
On 8/28/07, Chas Owens <[EMAIL PROTECTED]> wrote: > > On 8/28/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: > > When i write the condition > > my @m = $fullStruct =~ /$DLstatement/g; > > and try printing the array, > > print "\nThe array is @m\n"; > > It prints nothing This is th

conflicting errors

2007-08-28 Thread Chris
I'm writing a script that maps out a file system. Here is what I have so far: #!/usr/bin/perl -w use strict; #use Data::Dumper; sub data_for_path { my $path = shift; if (-f $path or -l $path) { return undef; } if (-d $path) { my %di

Re: conflicting errors

2007-08-28 Thread yitzle
perl -c says the syntax is OK when I add the semicolon and has a similar message without it, so I guess that's it. Note: I think you are supposed to replace: #!/usr/bin/perl -w with #!/usr/bin/perl use warnings; Its more proper or something. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Regex Issue

2007-08-28 Thread Dharshana Eswaran
Hi All, I have written a program, use strict; use warnings; my $Enum = "typedef enum _SIGNAL_E { LEVEL_0_EV = 0, LEVEL_1_EV, LEVEL_2_EV, LEVEL_3_EV, LEVEL_4_EV, LEVEL_5_EV } SIGNAL_E;"; my $Enumidentifier = qr{ [A-Z0-9_]\w* }xs; my $Enumstatement = qr{ \s*

Re: File::Find

2007-08-28 Thread Omega -1911
On 8/28/07, Randal L. Schwartz <[EMAIL PROTECTED]> wrote: > > "Somu" == Somu <[EMAIL PROTECTED]> writes: > > Somu> Good sense of humour! Actually i wanted to search for F:/Hindi/RHTDM > Somu> and i entered only /Hindi/RHTDM/ > > Why did you do that? I think you have to enter the full path on

Re: conflicting errors

2007-08-28 Thread John W. Krahn
Chris wrote: I'm writing a script that maps out a file system. Here is what I have so far: #!/usr/bin/perl -w use strict; #use Data::Dumper; sub data_for_path { my $path = shift; if (-f $path or -l $path) { return undef; You normally don't need to return undef