RE: Append on top

2004-11-15 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Gary Stainburn [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 15, 2004 2:25 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Append on top
 
 
 On Friday 29 October 2004 10:35 am, Ing. Branislav Gerzo wrote:
  Rajesh Dorairajan [RD], on Thursday, October 28, 2004 at 18:11
  (-0700) thoughtfully wrote the following:
 
  RD Does anyone know of a way to open a file in append mode and
  append on top of RD the file?
 
  I don't think it is possible. You have to read source file, 
 and after 
  print your results to new file (open through ) and append old file 
  through 
 
 It is possible, but very messy.  The above method is the most 
 efficient, 
 but does require free disk space equivelent to the the size 
 of the new 
 file.  Not usually a problem these days, withthe low cost of HDDs.  
 
 However, if you do have these restrictions it can be done using the 
 psudocode below
 
 calculate write_size
 seek EOF-buffer_size
 read buffer_size
 seek EOF-buffer_size+write_size
 repeat until at BOF
 

Why should I care with all these details when Tie::File is available from CPAN.
And now comes as standard dist of recent Perl version ?

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is 
confidential and/or protected by intellectual property rights and are intended 
for the sole use of the recipient(s) named above. This email is not intended to 
create or affect any contractual arrangements between the parties.
Any use of the information contained herein (including, but not limited to, 
total or partial reproduction, communication or distribution in any form) by 
other persons than the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our 
website at http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: start http request and move on

2004-11-05 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: JupiterHost.Net [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 03, 2004 10:23 PM
 To: [EMAIL PROTECTED]
 Subject: start http request and move on
 
 
 Hey group,
 
 Not sure how I'd go about doing a url (via LWP probably) but 
 not wait for it to return.
 
 
   print Starting...\n;
   nowaiturl($url?foo=bar);
   print $url has been submitted. When it finishes running 
 you'll get an email. Have a super day\n; # or whatever :)
 
 
 The idea is to be able to submit data to $url for it to be processed 
 (which may take a while)
 without waiting for it to finish.
 
 LWP::Parallel does mutiple $urls in parallel but I want to submit a 
 single url like you would with LWP but not wait, does that make sense?
 
 Would a fork() of some sort be the best way?
 
 Or what is that even called so I can look around for it?


Randal has written an excellent column and shown how to deal with such needs.
Have a look to
http://www.stonehenge.com/merlyn/LinuxMag/col39.html

HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. This email is not intended to create or affect any 
contractual arrangements between the parties.
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Is that a DB server need to be installed ?

2004-11-04 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Bee [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 03, 2004 11:21 PM
 To: [EMAIL PROTECTED]
 Subject: Is that a DB server need to be installed ?
 
 
 Hi, 
 
 Just start on study about Database programming... Just wonder 
 is that a real DB server is needed to be installed before I 
 start my coding ? If so... which kind of server ( and modules) 
 is recommanded, easiest to get start for beginners ? I assume 
 that I will deal with both simple short data and some CLOB.. 
 

DBD::SQLite is your friend for that.
No need to install an heavy RDBMS server.
A normal Perl module install will be enough to play with complex SQL.
Some refs:
http://search.cpan.org/~msergeant/DBD-SQLite-1.07/lib/DBD/SQLite.pm
http://www.perl.com/lpt/a/2003/09/03/perlcookbook.html
http://www.perl.com/lpt/a/2004/09/12/embedded.html

I assume you know what DBI is used for :-)
 
HTH,
José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. This email is not intended to create or affect any 
contractual arrangements between the parties.
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Best FREE Perl installation for Windows??

2004-11-03 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Lone Wolf [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 03, 2004 3:52 AM
 To: [EMAIL PROTECTED]
 Subject: Best FREE Perl installation for Windows??
 
 
 I need to get back to an installed Windows Perl environment.  
 What's the best free option available out there, that 
 everyone would recommend?  I can do installs without too much 
 issues, so installer doesn't matter, but ease of use does.
 
 Thanks,
 Robert

IndigoPerl
http://www.indigostar.com/index.html

It comes with Apache + mod_perl

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. This email is not intended to create or affect any 
contractual arrangements between the parties.
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Append on top

2004-10-29 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Ing. Branislav Gerzo [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 29, 2004 11:36 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Append on top
 
 
 Rajesh Dorairajan [RD], on Thursday, October 28, 2004 at 
 18:11 (-0700) thoughtfully wrote the following:
 
 RD Does anyone know of a way to open a file in append mode 
 and append 
 RD on top of the file?
 
 I don't think it is possible. You have to read source file, 
 and after print your results to new file (open through ) and 
 append old file through 

Or no need to open the file:

use Tie::File;
tie @array, 'Tie::File', filename or die ...;
unshift @array, new recs; #will append on top
untie @array;

HTH,
José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. This email is not intended to create or affect any 
contractual arrangements between the parties.
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Append on top

2004-10-29 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Mandar Rahurkar [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 29, 2004 3:18 PM
 To: Rajesh Dorairajan; Perl-Beginners ([EMAIL PROTECTED])
 Subject: Re: Append on top
 
 
 read the file. Rewrite ur data into the file followed by 
 original data. easy way..
 

I'm not convinced this approach will do the job.
Please send an excerpt code ...

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. This email is not intended to create or affect any 
contractual arrangements between the parties.
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Question to use SOAP::Lite

2004-10-08 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Angela Chan [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 07, 2004 8:17 PM
 To: [EMAIL PROTECTED]
 Subject: Question to use SOAP::Lite
 
 
 Hi,
 
 I would like to use SOAP::Lite to communicate with the web 
 server, but I need to send the token to get the access. Does 
 anyone know how to set up in SOAP::Lite? I have the following 
 code, but I get the errorcode 1001, Request must have 
 exactly one security token message back. Does anyone give me 
 some hints? Thanks

Hint: better ask to soap-lite list :-)
http://lists.perl.org/showlist.cgi?name=SOAP-Lite

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Open file with default application software on Windows ?

2004-10-07 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Jenda Krynicky [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 07, 2004 4:10 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Open file with default application software on Windows ?
 
 
 From: Bee [EMAIL PROTECTED]
  I am curious to know that if that is an existed module to 
 open files 
  with it's default application just like I double click on the file 
  with mouse. and I do something just like this with my code :
  
  use defaultOpen;
  defOpen 'C:\temp.gif' or die $! ; # Then the image will open with 
  photoshop. defOpen 'C:\temp.doc' or die $! ; # then the document 
  will open with Word.
  
  I've made this done by writting a batch like code.. but I 
 sure that's 
  unsafe and unportable.
  
  Thanks for any hint,
  Bee
 
 The system('start file.doc') only allows you to trigger the default 
 action defined for the file type. If you want to use the other 
 actions you might like
   use Win32::FileOp qw(ShellExecute);
   ShellExecute 'Print' = 'c:\temp.doc';

ShellExecute $operation = $file;

How to find the list of available $operations ?

The doc says:
$operation : specifies the action to perform. The set of available operations depends 
on the file type. Generally, the actions available from an object's shortcut menu are 
available verbs.

object's shortcut menu ?
Could you elaborate please :-) ?

Thanks,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Open file with default application software on Windows ?

2004-10-07 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Jenda Krynicky [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 07, 2004 6:14 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Open file with default application software on Windows ?
 
 
 From: NYIMI Jose \(BMB\) [EMAIL PROTECTED]
   -Original Message-
   From: Jenda Krynicky [mailto:[EMAIL PROTECTED]
   The system('start file.doc') only allows you to trigger 
 the default
   action defined for the file type. If you want to use the other
   actions you might likeuse Win32::FileOp qw(ShellExecute);
 ShellExecute 'Print' = 'c:\temp.doc';
  
  ShellExecute $operation = $file;
  
  How to find the list of available $operations ?
  
  The doc says:
  $operation : specifies the action to perform. The set of available 
  operations depends on the file type. Generally, the actions 
 available 
  from an object's shortcut menu are available verbs.
  
  object's shortcut menu ?
  Could you elaborate please :-) ?
 
 You can either find the list of actions if you manualy rightclick a 
 file of that type in Windows Explorer (the topmost section of the 
 menu except Open With) or go to the registry (regedit.exe) go to 
 HKEY_CLASSES_ROOT\.doc, look at the default value (the type of the 
 file), then go to HKEY_CLASSES_ROOT\the_type\Shell and the subkeys 
 are the different available actions. ShellExecute lets you use either 
 the name of the subkeys or the title specified in the default value 
 in that subkey.
 
 If you need to find the list of actions programaticaly you just use 
 Win32::Registry ro Tie::Registry to do the same. Find the type from 
 HKEY_CLASSES_ROOT\.ext, go to HKEY_CLASSES_ROOT\the_type\Shell and 
 list the subkeys.
 
 HTH, Jenda
 P.S.: Please do not CC me on emails sent to the list. Both 
 emails end up in the same folder anyway.
 

Great !
I think you should add such info in the module documenation.

Thanks,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Email syntax validation

2004-10-05 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Randal L. Schwartz [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, October 05, 2004 4:31 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Email syntax validation
 
 
 Silly person.

Oh  oh! What's this ?
I can't imagine that's comes from Randal :-(

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Becoming Disenheartened - Everyone talks about Python and saysPerl is old news.

2004-10-01 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Gabor Urban [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 01, 2004 11:05 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Becoming Disenheartened - Everyone talks about 
 Python and saysPerl is old news.
 
 
 Hi guys,
 
 this thread seems to expand into something unworthy of this 
 mailing list. You can not compare a cup of tea with a horse, 
 these are two totally different things.
 
 Both Perl and Python have it's place under the sun, both have 
 very good features, and some very difficult aspects, too. 
 Both can be perfect for the right tasks, but may be terrible 
 choices for others. THe real point if you write your code 
 correct, know what you are doing and make possible for others 
 to understand your source. The difference is between good and 
 poor developer. IMHO I could write this about any other 
 language, for example Cobol, too :-
 
 I am doing Python programming for living now, but create 
 reports on my log useng Perl. Perfect, smooth and efficient.
 

Agreed as well !

Could you guys keep this thread constructive or STOP it ... Please ?

Thx,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-10-01 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Nicolay A. Vasiliev [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 01, 2004 2:45 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Becoming Disenheartened - Everyone talks about 
 Python and says Perl is old news.
 
 
 To Randal and Chris. You all don't understand me. CGI is a module, 
 earlier wrote and stored in a separate files. I don't mean 
 such objects.
 
 Python and Ruby don't write the code for me. But look at this 
 Python code:
 
 s = I am Perl guru;
 new_s = s.replace(Perl, Python);
 

With this willing to treat everything as object you end up with
Ugly code such as the following:
http://www.python.org/cgi-bin/moinmoin/CgiScripts

#!/usr/bin/env python

import cgi

print Content-type: text/html
print
print

print 
html

headtitleSample CGI Script/title/head

body

  h3 Sample CGI Script /h3


form = cgi.FieldStorage()
if form.has_key( message ):
message = form[message].value
else:
message = (no message)

print 

  pPrevious message: %s/p

  pform:/p

  form method=post action=index.cgi
pmessage: input type=text name=message//p
  /form

/body

/html
 % message


That I let the beginners-list to show you how it can be nicer written in Perl :)

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: How Can I rename File using Perl?..

2004-09-30 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Roime bin Puniran [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 30, 2004 11:20 AM
 To: [EMAIL PROTECTED]
 Subject: How Can I rename File using Perl?..
 
 
 How can i rename any file using PERL?...Where should i 
 start?..Where i can find any tutorial?

C:\perldoc -f rename
rename OLDNAME,NEWNAME
Changes the name of a file; an existing file NEWNAME will be
clobbered. Returns true for success, false otherwise.

Behavior of this function varies wildly depending on your system
implementation. For example, it will usually not work across
file system boundaries, even though the system *mv* command
sometimes compensates for this. Other restrictions include
whether it works on directories, open files, or pre-existing
files. Check perlport and either the rename(2) manpage or
equivalent system documentation for details.


C:\

C:\perldoc perldoc

to learn how to use perldoc

HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: How to track the success of insert

2004-09-29 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Anish Kumar K. [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 29, 2004 9:28 AM
 To: beginners perl
 Subject: How to track the success of insert
 
 
 Hi
 
 I was trying out some practice examples with DBI and CGI and 
 kind of stuck while doing a comparison
 
 That is if I  could insert successfully into a databse a 
 script window shld come Success. but when the insert fails 
 a window shld come saying Can;t insert ..
 
 How will I track if the insertion is success or not? Below is 
 the program...
 
 
 use strict;
 use warnings;
 use CGI;
 use DBI;
 my $cgi = new CGI;
 print $cgi-header( text/html );
 print $cgi-start_html( Welcome );
 my $dbh = 
 DBI-connect(DBI:Pg:dbname=testdb;host=localhost,'postgres',
 'postgres',{RaiseError=1,PrintErr
 or=1})
 or die Cannot connect to testdb\n;
 
 my $sth=$dbh-prepare(insert into userinfo 
 values('$fvalue','$lvalue','$email'));
 $sth-execute();
if($sth)
 {
print $cgi-p( script language=Javascript 
 alert('Execution Done') /script );
 }
  else
{
print $cgi-p(Script language=Javascript 
 alert('Execution Not Done') /script );
}

Suggestion:
Put your instert inside a transaction like this:

[snip]

#begin transaction
$dbh-begin_work;
eval{   
#you can decide to combine prepare() and execute() into do()
$dbh-do( insert into userinfo values ('$fvalue','$lvalue','$email') );
};
#check if the transaction went ok
if($@){ 
$dbh-rollback;
print $cgi-p(Script language=Javascript alert('Execution Not Done') 
/script );
}
else{
$dbh-commit;
print $cgi-p( script language=Javascript alert('Execution Done') 
/script );  
}


Tim Bunce (the Auteur of DBI) gave a nice presentation about
DBI transactions that you can find from this link:
http://search.cpan.org/src/TIMB/DBI_AdvancedTalk_2004/sld054.htm

Or from
http://dbi.perl.org (Online Documentation)

HTH,

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: How to track the success of insert

2004-09-29 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Anish Kumar K. [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 29, 2004 9:28 AM
 To: beginners perl
 Subject: How to track the success of insert
 
 
 Hi
 
 I was trying out some practice examples with DBI and CGI and
 kind of stuck while doing a comparison
 
 That is if I  could insert successfully into a databse a
 script window shld come Success. but when the insert fails 
 a window shld come saying Can;t insert ..
 
 How will I track if the insertion is success or not? Below is
 the program...
 
 
 use strict;
 use warnings;
 use CGI;
 use DBI;
 my $cgi = new CGI;
 print $cgi-header( text/html );
 print $cgi-start_html( Welcome );
 my $dbh =
 DBI-connect(DBI:Pg:dbname=testdb;host=localhost,'postgres',
 'postgres',{RaiseError=1,PrintErr
 or=1})
 or die Cannot connect to testdb\n;
 
 my $sth=$dbh-prepare(insert into userinfo
 values('$fvalue','$lvalue','$email'));
 $sth-execute();
if($sth)
 {
print $cgi-p( script language=Javascript 
 alert('Execution Done') /script );
 }
  else
{
print $cgi-p(Script language=Javascript 
 alert('Execution Not Done') /script );
}

Suggestion:
Put your instert inside a transaction like this:

[snip]

#begin transaction
$dbh-begin_work;
eval{   
#you can decide to combine prepare() and execute() into do()
$dbh-do( insert into userinfo values ('$fvalue','$lvalue','$email') );
$dbh-commit;
};
#check if the transaction went ok
if($@){ 
$dbh-rollback;
print $cgi-p(Script language=Javascript alert('Execution Not Done') 
/script );
}
else{
print $cgi-p( script language=Javascript alert('Execution Done') 
/script );  
}


Tim Bunce (the Author of DBI) gave a nice presentation
about DBI transactions that you can find from this link:
http://search.cpan.org/src/TIMB/DBI_AdvancedTalk_2004/sld054.htm

Or from
http://dbi.perl.org (Online Documentation)

HTH,

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: How to find if a key exist in hash?

2004-09-29 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Edward Wijaya [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 29, 2004 12:17 PM
 To: [EMAIL PROTECTED]
 Subject: How to find if a key exist in hash?
 
 
 Hi,
 
 I have the following code,
 and I know it is HORRIBLE.
 
 I wonder if I can do it in more
 efficient and elegant way?
 
 Thanks so much
 and
 
 Regards,
 Edward WIJAYA
 SINGAPORE
 
 
 __BEGIN__
 use strict;
 use warnings;
 use Getopt::Std;
 use Data::Dumper;
 
 my %hash = (
A = 'blabla',
B = 'dadada',
C = 'tititi',
 );
 
 my $s = 'A';
 my $get = check_ifHash_key_exist(\%hash, $s);
 print Got it: $get\n;
 
 #--- this is how I do it (don't laugh) --
 
   sub check_ifHash_key_exist {
 
   my ($hash, $str) = @_;
   my $found_str;
   my @array = keys %{$hash};
   for (my $i= 0; $i  keys %{$hash}; $i++) {
 if ($array[$i] eq $str) {
  $found_str = $array[$i];
 last;
 }
  }
   return $found_str;
   }
 __END__


perldoc -f exists

See Also:
http://search.cpan.org/~bpowers/Hash-NoVivify-0.01/NoVivify.pm

HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-09-29 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 29, 2004 4:38 PM
 To: JupiterHost.Net; [EMAIL PROTECTED]
 Subject: Re: Becoming Disenheartened - Everyone talks about 
 Python and says Perl is old news.
 
 
  My what long lines you have :)
  
   It may not be commercial grade but, who of us writes commerical
 applications all the time. 
  
  I do mostly, private corporate backends mostly among other 
 things :) I 
  use it for the quick tasks and simple scripts also of course. (the 
  projects never end the same as durability and ability)
  
  And cPanel (http://cpanel.net) is mostly perl for instance. I'd say 
  that's pretty commercial seeing as how many webhosts use it.
  
  An associate of mine worked for/does consulting for a nationwide
  communications provider that uses all perl for the website, 
 and backend 
  employee/customer/support/work order/materials handling/etc etc.
  
  Apple's website uses perl last I heard (the .adp extension is their
  special build of it)
  
  That's just 4 that I knew off off the top of my head.
 
http://perl.oreilly.com/pub/a/oreilly/perl/news/success_stories.html
http://poe.perl.org/?Organizations_Using_POE

Those are just a few more...

Indeed !
http://masonhq.com/?MasonPoweredSites

Plus more ...



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: calling Perl Script from JSP?

2004-09-21 Thread NYIMI Jose \(BMB\)
 -Original Message-
 From: Drue Reeves [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 21, 2004 4:49 AM
 To: [EMAIL PROTECTED]; Cary Andrews
 Subject: calling Perl Script from JSP?
 
 
 
 Anyone know how to call a PERL Script from a JSP and pass 
 parameters to the script?
 
 I have a JSP that will call PERL but, everytime we try to add 
 a script nothing happens. Any ideas?
 

Very bad idea trying to mix Perl and JSP ...
Which feature of Perl do you want to use in your JSP page that you can't get from Java 
?

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: HINT: regex coach

2004-09-09 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Jose Alves de Castro [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 08, 2004 7:42 PM
 To: Ing. Branislav Gerzo
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: HINT: regex coach
 
 
 On Wed, 2004-09-08 at 10:17, Ing. Branislav Gerzo wrote:
  Hi,
  
  many of us need sometime fast help with regex. I recently 
 found on the 
  web really nice and easy program. Maybe someone of you already know 
  it, for those, who don't it is REGEX COACH, download it from:
  
  http://www.weitz.de/regex-coach/
 
 Just so this message isn't left unanswered, I'll state:

This hint have been sent many times to this list that's may be why
There wasn't reactions to this message ?

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: HINT: regex coach

2004-09-09 Thread NYIMI Jose \(BMB\)
 -Original Message-
 From: Jose Alves de Castro [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 08, 2004 7:42 PM
 To: Ing. Branislav Gerzo
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: HINT: regex coach
 
 
 On Wed, 2004-09-08 at 10:17, Ing. Branislav Gerzo wrote:
  Hi,
  
  many of us need sometime fast help with regex. I recently 
 found on the 
  web really nice and easy program. Maybe someone of you already know 
  it, for those, who don't it is REGEX COACH, download it from:
  
  http://www.weitz.de/regex-coach/
 
 Just so this message isn't left unanswered, I'll state:

This hint have been sent many times to this list that's may be why
There wasn't reactions to this message ?

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: how to embed c code in perl programs

2004-08-13 Thread NYIMI Jose \(BMB\)
 -Original Message-
 From: Karthick [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 13, 2004 9:17 AM
 To: [EMAIL PROTECTED]
 Subject: how to embed c code in perl programs
 
 
 Hi,
 Is it possible to embed C/C++ codes into perl programs. 
 (Actually I want to make use of an API, that could be used 
 with with C). Thanks in Advance, Karthick.S

Hint:
Check if following modules can help you:
Inline::C
Inline::CPP
http://search.cpan.org/search?query=Inline%3A%3ACmode=module

HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: How to avoid writing files that is used by other programs?

2004-08-06 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 06, 2004 10:49 AM
 To: [EMAIL PROTECTED]
 Subject: Re: How to avoid writing files that is used by other 
 programs?
 
 
 Shu Hung wrote:
  I am writing a script to relocate some tar files in a folder.
  
  Since those tar files are scheduled to be written daily, I want to 
  make sure I'm not moving any files which are being written by other 
  programs...
  
  How can I do so?
 
 You can lock them.
 
  perldoc -f flock
  perldoc -q lock a file
 

I have a question,
It seems that (from original post) there are 2 programs there:
Program1: writing the tar files
Program2: trying to relocate tar files created by program1

My understanding is that the lock should be done by the program1 to avoid
program2 relocate files untill it (program1) finishs writting them.

If the program1 is not under your control, how to use the lock solution you 
suggested ?

Thanks,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Using binding in order to pass values to a sql statement.

2004-08-06 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: jason corbett [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 06, 2004 5:44 PM
 To: perl beginners
 Subject: Using binding in order to pass values to a sql statement.
 
 
 Hello all. I am trying to use bind_param to create a list of 
 values in the form of an array. Then I want to query the data 
 base using a basic sql statement where each value in my list 
 (array) will be sent to the DBI in order to return a value. I 
 am getting and error that says can't call method bind_param 
 on defined value at line *. Here in the subroutine that 
 will attempt to do this.
  
  
  
 sub kill_porq{
 my @banlist=qw(
 222497190
 291529832
 285471249
 280768305
 276573798
 278628710
 297888281
 297002394
 271831939
 127465
 245710698
 314086723
 347803890
 253926979
 226200204
 250702348
 246597179
 301791980
 332270292
 344909948
 283580543
 325838931
 349835609
 248436566
 240499101
 245185000
 353432496
 246334241
 279430907
 222800122
 );
  my $ban='';
  foreach $ban (@banlist){
  
  
  $sth-bind_param (1, $ban);
 
  
  $sth=$dbh-prepare(select request_no, ban, request_sts, 
 

Binding should come after preparing ...

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Using binding in order to pass values to a sql statement.

2004-08-06 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 06, 2004 6:09 PM
 To: jason corbett; perl beginners
 Subject: Re: Using binding in order to pass values to a sql statement.
 
 
  
  Hello all. I am trying to use bind_param to create a list 
 of values in
 the form of an array. Then I want to query the data base 
 using a basic sql statement where each value in my list 
 (array) will be sent to the DBI in order to return a value. I 
 am getting and error that says can't call method bind_param 
 on defined value at line *. Here in the subroutine that 
 will attempt to do this.
   
   
   
  sub kill_porq{
  my @banlist=qw(
  222497190
 snip list
  222800122
  );
   my $ban='';
   foreach $ban (@banlist){
   
   
   $sth-bind_param (1, $ban);
 
 Normally you would prepare the statement once, since it 
 doesn't change. If you prepare it each time through the loop 
 you lose the efficiency gain. So move the prepare before the foreach.
 
 That will also solve the scoping problem you have, are you 
 using 'strict'?  $sth in the above line should not yet be 
 defined. You should have,
 
 my $sth;
 
 Inside the loop, this would help you see the issue.
 
  
   
   $sth=$dbh-prepare(select request_no, ban, request_sts, 
 status_act,
 NPAC_Process_ind, external_req_no
from vstappo.port_request
 where ban = ?
   );
   
   
   $sth-execute();
 
 
 You can also call execute with your bind params in the call, 
 so that you only need to make one method call, so,
 
 $sth-execute($ban);
 
 Should be sufficient without the 'bind_param' call at all.
   
 Of course you aren't doing anything with $sth here?  And you 
 will need to store your result set as each execute on the 
 $sth will clear the previous one (I believe).
 
 Alternatively you could build a better statement using the 
 $ban list and pass all of it to the database at once to get 
 all of the data in a single execute.
 
  return;
  }
  
  
 
 HTH,

You all right Wiggins ...
Prepare once and execute everywhere :-)


José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: using Class::Struct in a module

2004-08-05 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of 
 Christopher J. Bottaro
 Sent: Thursday, August 05, 2004 12:35 AM
 To: [EMAIL PROTECTED]
 Subject: using Class::Struct in a module
 
 
 package My::Module;
 use Class::Struct;

use strict;
use warnings;

 
 struct Blah = {
 field1 = '$',
 field2 = '$'
 };
 
 sub new {
 # normal constructor
 }

I suppose you have some code in the above new() :-)

 
 sub f   {
 my $s = new Blah; # this calls new() defined above
 $s-field1 = 1;
 $s-field2 = 2;

The syntax should be:
$s-field1(1);
$s-field2(2);


 return $s;
 }
 
 package main;
 
 my $obj = new My::Module;
 my $s = $obj-f();
 print $s-field1\n$s-field2\n;

Better putting $s outside of double quote:
print $s-field1.\n.$s-field2.\n;

 
 -
 
 ok, the problem is that in My::Module::f(), the statement my 
 '$s = new Blah' calls My::Module::new() instead of 
 constructing a struct of type Blah.  how can i get this code 
 to perform the way i want?

Below is your code reviewed:

package My::Module;
use strict;
use warnings;
use Class::Struct;

struct( Blah = { field1 = '$', field2 = '$'} );

sub new {
my($caller)[EMAIL PROTECTED];
print normal constructor called!\n;
  my $class=ref $caller || $caller;
  my $self = {};
  bless $self = $class;   
}

sub f {
my $s = Blah-new();
$s-field1(1);
$s-field2(2);
return $s;
}

package main;

my $obj =My::Module-new();
my $s = $obj-f();

print $s-field1.\n.$s-field2.\n;


OUTPUT:

normal constructor called!
1
2


HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: integrating C++ apps with perl

2004-08-05 Thread NYIMI Jose (BMB)


 -Original Message-
 From: anon ymous [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 05, 2004 12:17 PM
 To: [EMAIL PROTECTED]
 Subject: integrating C++ apps with perl
 
 
 Hi,
 
 I've never used perl before, and I have a gut feeling that it 
 might be 
 the tool to fit a requirement I have, but I'm not sure. If anyone can 
 confirm that I'm not barking up the wrong forest, then that'd 
 be great.
 
 
 I have a C++ application that's mainly on unix, but it's 
 designed to be 
 platform dependent. Generally it's generating a large number of data 
 structures which it will eventually pass to another application. The 
 data structure consists of strings and numbers, and is nested 
 so varies 
 in length.
 
 At some point while it's handling those structures I want to give the 
 user an opportunity to transform each data structure into 
 anything they 
 like, after which it gets passed back into my application 
 before final 
 delivery. Users will probably change the structure into a 
 text message 
 like XML, but it could just as easily be entirely binary 
 (even the XML 
 messages might have message delimiter characters like 0x01). 
 This will 
 allow my system to maintain a compatibility with other 
 people's systems 
 without recompilation etc (there's no such thing as 
 standardisation in 
 my world yet I'm afraid).
 
 At it's simplist, my application could dump each structure as a file, 
 then the perl program reads, transforms, and writes out a new file, 
 cleaning up the old files, and my app reads in the new file. 
 But really 
 I'd like it to be all handled in memory (for speed I guess, 
 and low disk 
 grinding). I'd also like to retain the platform independence 
 nature of 
 everything.
 
 
 So, can a C++ app pass data to a perl (script?) and then receive data 
 back? Does the C++ application have to 'embed' a perl object somehow?
 

perldoc perlembed

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: DBI Install

2004-08-04 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Witzke, Rob [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 04, 2004 3:30 PM
 To: [EMAIL PROTECTED]
 Subject: DBI Install
 
 ...
 /bin/sh: /opt/SUNWspro/bin/cc: not found
 make: *** [Perl.o] Error 1

Your compiler was not found ...

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: C Compiler

2004-08-04 Thread NYIMI Jose \(BMB\)


 -Original Message-
 From: Witzke, Rob [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 04, 2004 4:24 PM
 To: PerlBeginners (E-mail)
 Subject: C Compiler
 
 
 Any recommendations on a c compiler to run on a Sun Sparc box?
 
 Rob

Have a look to DBI FAQs
http://dev.isystek.com/dbi/fom-serve/cache/12.html
From
http://dbi.perl.org

HTH,

José.




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: DBI Install

2004-08-04 Thread NYIMI Jose \(BMB\)
 -Original Message-
 From: Witzke, Rob [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 04, 2004 4:32 PM
 To: Chris Devers
 Cc: PerlBeginners (E-mail)
 Subject: RE: DBI Install
 
 
 Chris,
 
 Thank you very much for you help.
 
 I ran your command $ perl -MDBI -e '1' and got no results so 
 I guess that is a good thing.
 
 I will be looking into getting a c compiler.  Any suggestions?

Have a look to DBI FAQs
http://dev.isystek.com/dbi/fom-serve/cache/12.html
From
http://dbi.perl.org

HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: A simple client/server problem

2004-07-30 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Dan Timis [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 30, 2004 7:47 AM
 To: [EMAIL PROTECTED]
 Subject: A simple client/server problem
 
 
 Hi everyone,
 
 I am very new to Perl.  I need two perl scripts, one would run on a 
 client, the
 other would run on a server.
 
 The perl script on the client machine runs an application.  The 
 application
 creates a file called request.xml  The perl script reads the file, 
 and sends
 it to the server.
 
 A cgi script on the server reads the file and saves it as 
 request.xml 
 then
 runs another application.  The application reads request.xml and 
 creates
 reply.xml.  The server perl script reads reply.xml and sends it 
 back to the
 client.
 
 The client reads the data from the server and saves it as reply.xml
 
 I looked all over for some example code.  I found lots of examples 
 about how to
 upload a file to the server, but they are all about the server part, 
 and how to
 generate html that would let a user choose a file to upload.  I could 
 not find
 anything about how a client would connect to a server, send 
 some data, 
 and then
 read some data back.
...
...

 I think I can also handle most of the client side.  What I don't know 
 how to do
 is open a two way connection with the server.  Do I do something like 
 this:
 
  open CONNECTION http://www.myserver.com/cgi-bin/generate-reply;
 
 Where can I find some example code?

You may need XMLRPC.
http://www.xmlrpc.com
http://xmlrpc-c.sourceforge.net/xmlrpc-howto/xmlrpc-howto-perl-client.html
http://xmlrpc-c.sourceforge.net/xmlrpc-howto/xmlrpc-howto-perl-cgi.html

A Perl Client (not tested !)
The following program shows how to call an XML-RPC server from Perl:

use strict;
use warnings;
use Frontier::Client;

# Make an object to represent the XML-RPC server.
my $server_url = 'http://www.myserver.com/cgi-bin/generate-reply.pl';
my $server_obj = Frontier::Client-new(url = $server_url);

# Call the remote server and get our result.
my $request_data = subroutine_to_get_your_request_xml_data();
my $result_obj = $server_obj-call('in', $request_data);
my $reply_data = $result_obj-{'out'};
#the rest ...

Hope that gives you some new ideas ...

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Perl - Expect

2004-07-15 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Ohad Ohad [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 15, 2004 1:36 PM
 To: [EMAIL PROTECTED]
 Subject: Perl - Expect
 
 
 Hi,
 
 I need to telnet some hosts automatically without supplying password.
 
 I can do it with Expect but I hardly know the language.
 
 I wonder what you think of the Perl module Expect - if it's 
 any good and 
 easy to use.
 
 Also if you can think of another way to do the job this will 
 also be great.
 

I never used Expect::Simple but it seems to be less complex than the Expect module 
itself.
http://search.cpan.org/~djerius/Expect-Simple-0.02/Simple.pm

Just a thought ...

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: how to extract digit from a line in Perl

2004-07-14 Thread NYIMI Jose (BMB)
Title: Message





  
  -Original Message-From: Franklin 
  [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 12:01 
  PMTo: [EMAIL PROTECTED]Subject: how to extract digit 
  from a line in Perl
  

  
Hello:

I want to extract the digit from a line of text. For exmple, for a 
text line: TSC2101Net, how can I write a script to extract 2101 and print it?

Thank you very much in advance!

Bestwishes
Franklin



  

  
  



   
  IncrediMail - Email has finally evolved - Click Here
  
  
  If you are SURE that your digits are always between TSC and Net,
  You can do the following:
  my ($number)=$text=~/TSC(\d+)Net/;
  print "$number\n";
  HTH,
  José.

 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent.




IMSTP.gif
Description: IMSTP.gif


RE: Mail App

2004-07-07 Thread NYIMI Jose (BMB)


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, July 07, 2004 1:18 AM
 To: [EMAIL PROTECTED]
 Subject: Mail App
 
 
 Hello all,
 
 I have written first in PHP and then in Java an app to fetch 
 attachments from a remote mailbox.
 
 I am not satisfied with Java's libraries as well as its 
 memory requirements and speedy. Therefore I want to do the 
 same in Perl so that it can run smoothly on my Linux box.
 
 Because of that I would like to ask some advice and where to 
 find documentation about it.
 
 The script needs to:
 - Read the messages, headers from a mailbox and Download only 
 .zip and .txt from each message if it has one or more attachments.
 - Delete the message.
 So, it is kind of a for loop that iterates through the messages lists.
 
 After that I need to uncompress the zip files and process its 
 contents that will be inserted on a Database.
 
 What are the Perl modules to achieve that? Is there any 
 documentation about it?
 
 I am new to Perl but I have writen many programs in C, C++. 
 Java, PHP, Pascal, etc.
 
 Thanks,

Mail::Box is your friend !
I'm using it with a lot of success for needs similar to yours.

Here some references:
http://perl.overmeer.net/mailbox/
http://search.cpan.org/~markov/Mail-Box-2.055/lib/Mail/Box.pod
http://marc.theaimsgroup.com/?l=perl-mailbox

Join its maillist, the Author of the module is there supporting you ...

HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: make perl scripts in to .exe and a services

2004-07-06 Thread NYIMI Jose (BMB)


 -Original Message-
 From: Prasanna Kothari [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 06, 2004 3:29 PM
 To: Thomas Browner
 Cc: [EMAIL PROTECTED]
 Subject: Re: make perl scripts in to .exe and a services
 
 
 Look at this:
 http://www.indigostar.com/perl2exe.htm

PAR has some advantages over perl2exe has mentioned from
http://search.cpan.org/~autrijus/PAR-0.85/lib/PAR/Tutorial.pod#Advantages_over_perlcc,_PerlApp_and_Perl2exe

my_paste

Advantages over perlcc, PerlApp and Perl2exe

* This is not meant to be a flame 
** All three maintainers have contributed to PAR directly; I'm grateful 
* perlcc
** The code generated in this way is not guaranteed to work...
Use for production purposes is strongly discouraged. (from perldoc perlcc)
** Guaranteed to not work is more like it 
* PerlApp / Perl2exe
** Expensive: Need to pay for each upgrade 
** Non-portable: Only available for limited platforms 
** Proprietary: Cannot extend its features or fix bugs 
** Obfuscated: Vendor and black-hats can see your code, but you can't 
** Inflexible: Does not work with existing Perl installations 

/my_paste

PAR Home page:
http://par.perl.org

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Getting the free Microsoft compiler

2004-07-05 Thread NYIMI Jose (BMB)
Hello,

I just wanna share the info below I got from PAR maillist.
I found it very intersting, since sometimes you need to install/compile yourself some 
CPAN modules
Instead of closing fingers to find a pre-built version of that module via ppm :-)

Cheers,

José.

-Original Message-
From: Alan Stewart [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 03, 2004 3:30 AM
To: [EMAIL PROTECTED]
Subject: Getting the free Microsoft compiler to compile PAR


Even though Autrijus kindly supplies pre-compiled PAR packages, I always roll my own 
and I have been using VC++ 6.0. I'm sure there are other Windows users who might if it 
were free, so I tried the free (and newer) Microsoft Visual C++ Toolkit 2003, also 
known as VC++ 7.

I found, as many have, that it is missing some pieces. There are a number of Windows 
header files not in the include dir (gee, why would Microsoft think a Windows compiler 
should need Windows headers ?!?), and a couple utilities not in the bin dir. They can 
be gotten for free from the SDK. Here is a good description from some Tcl people on 
finding all the pieces:

http://wiki.tcl.tk/11431

Be aware that it takes a couple of Gigabytes of disk space to download and install the 
SDK, while you only need about 25 Megabytes of stuff from the include/bin dirs for 
Perl/PAR stuff. I installed it, copied what I needed to the Toolkit dirs and 
uninstalled the SDK.

The Tcl discussion notes that some compiler options have changed. I got no errors with 
PAR/ActivePerl 5.6.1, but with PAR/ActivePerl 5.8.4 I got a warning about -Gf being 
deprecated in favor of -GF. I changed both occurances of -Gf to -GF in Config.pm and 
built clean. You could also just ignore the warning. It still works.

HTH

Alan Stewart



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: :Socket for http download

2004-07-02 Thread NYIMI Jose (BMB)


 -Original Message-
 From: Ramprasad A Padmanabhan 
 [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 02, 2004 9:58 AM
 To: Randy W. Sims
 Cc: perl beginners
 Subject: Re: :Socket for http download
 
 
 
  LWP requires none of those tools. It does exactly what you are
  describing: it opens a socket and uses the HTTP protocol to 
 talk to the 
  server.
  
  Randy.
  
 
 Right. Do you have any sample http client script , using 
 IO::Socket If I get some sample script , my work will be 
 reduced a lot 
 

Check out lwp cookbook:
http://search.cpan.org/~gaas/libwww-perl-5.800/lwpcook.pod
http://www.perldoc.com/perl5.8.0/lib/lwpcook.html

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Favorite email parser?

2004-06-30 Thread NYIMI Jose (BMB)


 -Original Message-
 From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, June 30, 2004 3:48 PM
 To: Perl Beginners
 Subject: Re: Favorite email parser?
 

 Mail::Box is excellent and incredibly thorough, which also 
 means it is incredibly complex and has a pretty steep 
 learning curve.  It was by far the most robust mail handling 
 I could find, and took me the longest to learn.  It is also 
 not the most efficient, but then that wasn't our goal.

I'm using with a lot success Mail::Box and I'm curious to know
Which aspect of Mail::Box you found to be not effecient ?

Thanks,

José.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Favorite email parser?

2004-06-30 Thread NYIMI Jose (BMB)


 -Original Message-
 From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, June 30, 2004 6:14 PM
 To: NYIMI Jose (BMB); Perl Beginners
 Subject: RE: Favorite email parser?
 
 
  
  
   -Original Message-
   From: Wiggins d Anconia [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, June 30, 2004 3:48 PM
   To: Perl Beginners
   Subject: Re: Favorite email parser?
   
  
   Mail::Box is excellent and incredibly thorough, which also
   means it is incredibly complex and has a pretty steep 
   learning curve.  It was by far the most robust mail handling 
   I could find, and took me the longest to learn.  It is also 
   not the most efficient, but then that wasn't our goal.
  
  I'm using with a lot success Mail::Box and I'm curious to 
 know Which 
  aspect of Mail::Box you found to be not effecient ?
  
 
 Load time mostly, since it is a massive library. For our app 
 that didn't matter much since it runs for months at a time 
 and we have much more overhead with POE.  We are also running 
 off a pretty old version, and with all of the memory leak 
 fixes and the C parser, it might be significantly better than 
 when I was doing load testing (year ago).
 
 Doubt it would stack up compared to some of the other mail 
 parsers, but then they wouldn't in feature list come even 
 close, but that is really a hinderance of Perl in general 
 rather than anything specific about MB. 
 Essentially with the need for so many objects and doing 
 everything through methods there is a fair amount of overhead 
 even if you just want to do something trivial, but that *is* 
 the point, it is a very good interface for doing non-trivial things.
 

Thanks for sharing ...

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Helpful Regular Expression Tool

2004-06-16 Thread NYIMI Jose (BMB)


 -Original Message-
 From: Roberts Mr Richard L [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, June 16, 2004 2:55 PM
 To: 'Ciemny, Jessica'; [EMAIL PROTECTED]
 Subject: RE: Helpful Regular Expression Tool
 
 
 URL?

Google :-)
http://www.google.be/search?q=Regex+Coachie=UTF-8hl=nlmeta=

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: use lib(''); Apache httpd.conf

2004-06-08 Thread NYIMI Jose (BMB)


 -Original Message-
 From: Alex Newby [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, June 08, 2004 9:54 AM
 To: [EMAIL PROTECTED]
 Subject: use lib(''); Apache httpd.conf
 
 
 Hi,
 
 I have a rather simple question that Google hasn't produced 
 answers for. Basically, I am installing Mason in a virtual 
 host under mod_perl. The libraries I need are housed in ~/my/lib 
 
 How might I make Apache aware of ~/my/lib from the httpd.conf 
 so that the
 following:
 
 PerlModule HTML::Mason::ApacheHandler
 
 will load? What is the equivalent for the httpd.conf of use 
 lib('/my/lib'); ?

Have you RTFM ?
http://www.masonhq.com/docs/manual/Admin.html

HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: DBI

2004-06-07 Thread NYIMI Jose (BMB)


 -Original Message-
 From: lohit [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 07, 2004 8:58 AM
 To: aditi gupta
 Cc: [EMAIL PROTECTED]
 Subject: Re: DBI
 
 
 on windows...
 set HTTP_Proxy=your proxy with port
 ppm
 search DBI
 install DBI

Just to complete,
in addition to HTTP_proxy
SET HTTP_proxy_user=your user name (if required) 
SET HTTP_proxy_pass=your password (if required)

Have a look to:
http://aspn.activestate.com/ASPN/docs/ActivePerl/faq/ActivePerl-faq2.html#ppm_and_proxies

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: splitting with special characters

2004-06-03 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Singh, Ajit p [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, June 03, 2004 3:11 PM
 To: Singh, Ajit p; [EMAIL PROTECTED]
 Subject: splitting with special characters
 
 
 Hello All,
 
 I am trying to split a string with the / ( forward slash) as 
 the marker.
 
 $mystring = abcde/fghi
 
 split (///,$mystring)  -- gives me compile error
 split (/\//,$mystring)  -- gives me abcdefghi

Your syntax is ok.
split (/\//,$mystring) actually retuns an array.
In your case this array will be ('abcde', 'fghi').

use Data::Dumper;
my @array=split /\//,$mystring;
print Dumper [EMAIL PROTECTED];
#you did probably
#print @array;
#that's why you have seen abcdefghi ;)

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Question on Net::FTP.

2004-05-28 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Silky Manwani [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 28, 2004 3:42 AM
 Cc: [EMAIL PROTECTED]
 Subject: Re: Question on Net::FTP.
 
 
 Never mind.
 
 Figured it out.
 
 :)

Could you share the solution ?

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: error while building perl

2004-05-14 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Christian Stalp [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 14, 2004 1:46 PM
 To: [EMAIL PROTECTED]
 Subject: error while building perl
 
 
 Hello, 
 I just tryed to build perl with the gcc and got this dumped:
 
`sh  cflags optimize='-O2' toke.o`  toke.c
   CCCMD =  /opt/gcc/bin/gcc -DPERL_CORE -c -D_HPUX_SOURCE 
 -DUINT32_MAX_BROKEN -fno-strict-aliasing -D_LARGEFILE_SOURCE 
 -DARG_ZERO_IS_SCRIPT -O2  -Wall
 toke.c: In function `Perl_yylex':
 toke.c:5244: virtual memory exhausted
 *** Error exit code 1
 

Probably you have memory limitation.
what is the ouput of the ulimit -a (or limit -a) command ?

Mines is:

%ulimit -a
time(seconds)unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes)8192
coredump(blocks) unlimited
nofiles(descriptors) 2048
vmemory(kbytes)  unlimited

There is also unlimit command that let you remove limitation.
Check the doc (%man unlimit) or your sysadmin.

HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: error while building perl

2004-05-14 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Christian Stalp [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 14, 2004 2:58 PM
 To: NYIMI Jose (BMB)
 Cc: [EMAIL PROTECTED]
 Subject: Re: error while building perl
 
 
 Hey Jose,
 the output is:
 core file size (blocks) 2097151
 data seg size (kbytes)  65536
 file size (blocks)  unlimited
 max memory size (kbytes)unlimited
 open files  2048
 pipe size (512 bytes)   16
 stack size (kbytes) 8192
 cpu time (seconds)  unlimited
 max user processes  598
 virtual memory (kbytes) unlimited
 
 I think the virtual memory is not really the problem?
 

Ok,
Are you using the latest version of gcc ?
If not install one on /usr/local/bin/gcc
Since /usr/local became your favour dir ;)

Oh, look at gcc bugzilla:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=884

this seems to be a known gcc bug and apparently has been pacthed.

HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: error while building perl

2004-05-14 Thread NYIMI Jose (BMB)


 -Original Message-
 From: Christian Stalp [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 14, 2004 1:46 PM
 To: [EMAIL PROTECTED]
 Subject: error while building perl
 
 
 Hello, 
 I just tryed to build perl with the gcc and got this dumped:
 
`sh  cflags optimize='-O2' toke.o`  toke.c
   CCCMD =  /opt/gcc/bin/gcc -DPERL_CORE -c -D_HPUX_SOURCE 
 -DUINT32_MAX_BROKEN -fno-strict-aliasing -D_LARGEFILE_SOURCE 
 -DARG_ZERO_IS_SCRIPT -O2  -Wall

Your problem seems to be the use of -O2 option of gcc.
You could try to compile without this optimization option but I don't think this a
good way fixing a problem :-)

Just a thought ...

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Extracting attachment from mail

2004-05-13 Thread NYIMI Jose (BMB)
Hello,

I need to write a perl script that will run on solaris and the job of this script will 
be :

- read a mail from a predefined shared mail box (Outlook/Exchange Server)
- extract the mail attachment (text file)
- parse the content
- create an excel sheet (same content)

Any input is welcome ...

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.



RE: DBD for SQL Server?

2004-05-12 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Richard Crawford [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 12, 2004 12:40 AM
 To: [EMAIL PROTECTED]
 Subject: DBD for SQL Server?
 
 
 Is there a DBD for SQL Server so that I can connect to our SQL Server 
 2000 database with DBI?  I've hunted all over CPAN but I 
 can't seem to 
 find one.
 

I would try DBD::ODBC

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: DBD for SQL Server?

2004-05-12 Thread NYIMI Jose (BMB)


 -Original Message-
 From: Alok Bhatt [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 12, 2004 11:49 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: DBD for SQL Server?
 
 
 
 --- Richard Crawford [EMAIL PROTECTED]
 wrote:
  Is there a DBD for SQL Server so that I can connect
  to our SQL Server
  2000 database with DBI?  I've hunted all over CPAN
  but I can't seem to 
  find one.
 Windows uses the Open Database Connectivity (ODBC)
 Model. You can connect to an MS-SQL server using
 Win32::ODBC, available at 

Then you will no longer be using DBI API (what OP wanted) !

The advantage of DBD::ODBC (or DBD::ADO )
Is the portability of your code since you
Will be using the same api syntax regarless the
The database driver (DBD) you are dealing with behind DBI.

The connection is always
my $dbh=DBI-connect(...);

Not a new api like:
$Data = new Win32::ODBC(...);
Which obviously will not work if you need
To use your same code on a database running on unix box.

HTH,

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: installing DBI on HPUX

2004-05-10 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Christian Stalp [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 10, 2004 2:51 PM
 To: NYIMI Jose (BMB)
 Cc: [EMAIL PROTECTED]
 Subject: Re: installing DBI on HPUX
 
 
 
 
 
  You either need the HP ANSI C compiler or GCC. Since you 
 seem to use a 
  perl which was build using the HP ANSI C compiler it's easiest to 
  install that compiler on the system you're trying to get 
 DBI to work. 
  However, you need to PAY for that compiler so you might 
 want to switch 
  to GCC. I'm not entirely sure if you would need to recompile perl 
  itself with GCC for that to work. (would be best no doubt)
 
 Hello, I allready installed gcc but the Makefile calls the 
 HPUX-cc compiler. 
 (CC = cc )
 How can I tell the system to use the gcc instead of the cc?

If your perl has been compiled with cc, it will always generates the Makefile with 
CC=cc.
I'm afraid you will need to re-compile your perl with gcc.
Anyway, you can try to edit the Makefile and change CC=cc to CC=gcc
But I don't think this will work.

HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: installing DBI on HPUX

2004-05-10 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Peter Scott [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 10, 2004 3:31 PM
 To: [EMAIL PROTECTED]
 Subject: Re: installing DBI on HPUX
 
 
 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Christian Stalp) writes:
 
 Hello, I allready installed gcc but the Makefile calls the HPUX-cc 
 compiler.
 (CC = cc )
 How can I tell the system to use the gcc instead of the cc?
 
 perl Makefile.PL CC=/usr/local/bin/gcc

This seems to be a better way to go.
But I'm still wondering if he don't have to re-compile its perl with gcc ?

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: File Monitoring

2004-05-10 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 10, 2004 4:36 PM
 To: PerlDiscuss - Perl Newsgroups and mailing lists; 
 [EMAIL PROTECTED]
 Subject: Re: File Monitoring

[snip]

 There is a directory watching component in POE 

Where to find doc on that (link) ?

or you could grow your own, sorry
I can't provide the one I have (licensing issues).

Why did you re-invented the wheel ;)
Or Am I missing some basic infos ?

Thanks,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: File Monitoring

2004-05-10 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Dani Pardo [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 10, 2004 4:25 PM
 To: [EMAIL PROTECTED]
 Subject: Re: File Monitoring
 
 
 Hi, I've done this app. What I do is put into a file the 
 output of 
 ls -lR /directory_to_watch.
   Then use diff to compare the results. This gives the 
 advantage that, 
 if a line starts with +, then a new file has been added. If 
 it's -,  a 
 file has been deleted :)

Is this a joke  ? :-)

Here's a typical diff output:

17,18d16
 (who writes under the
 pseudonym Omniscient Trash)
45,46c43,44
 soon every Tom, Dick or Harry
 will be writing his own Perl book
---
 soon every Tom, Randal and Larry
 will be writing their own Perl book
69a68,69
 Copyright (c) 1998, The Perl Journal.
 All rights reserved.

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: File Monitoring

2004-05-10 Thread NYIMI Jose (BMB)


 -Original Message-
 From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 10, 2004 6:02 PM
 To: NYIMI Jose (BMB); PerlDiscuss - Perl Newsgroups and 
 mailing lists; [EMAIL PROTECTED]
 Subject: RE: File Monitoring
 
 
   -Original Message-
   From: Wiggins d Anconia [mailto:[EMAIL PROTECTED]
   Sent: Monday, May 10, 2004 4:36 PM
   To: PerlDiscuss - Perl Newsgroups and mailing lists; 
   [EMAIL PROTECTED]
   Subject: Re: File Monitoring
  
  [snip]
  
   There is a directory watching component in POE
  
  Where to find doc on that (link) ?
  
 
 http://search.cpan.org/~cholet/POE-Component-DirWatch-0.01/DirWatch.pm
 
  or you could grow your own, sorry
  I can't provide the one I have (licensing issues).
  
  Why did you re-invented the wheel ;)
  Or Am I missing some basic infos ?
  
 
 Good question.  Several reasons, mostly dealing with our 
 application overall.
 
 1. The component mentioned is a very good example of using 
 POE's inline sessions to do a polling type of activity but 
 isn't terribly robust (I don't believe it was designed nor 
 needs to be as a core component).
  
 2. The callback interface didn't quite suit our needs as we 
 were going for more of an overall OOP structure and wanted 
 continuity across the app components.
 
 3. I found it difficult to manage the directory watchers, for 
 a couple it would be sufficient but we were talking about 
 upwards of 40 to start, with more coming in the future.  One 
 of the key goals of our app was to have the ability to 
 pause/resume as well as start/stop a particular watcher at 
 any given time, the session based watcher made this more 
 difficult (in my mind) than an object based one.
 
 4. As a production app in a financial organization we needed 
 a lot of logging, and scalability, but could sacrifice 
 development time and maintenance.  We also wanted the logging 
 to be seemless across the app, so we built the logging 
 directly into the watcher we made.
 
 In the end because of the simplicity of the base module I 
 don't know that we reinvented the wheel, more like just put a 
 nice steel belted tire around it :-).  The underlying session 
 that forms the core of the component is still intact, the 
 same events are used, but the data structure itself is more 
 accessible and the HEAP usage was dropped in favor of a 
 standard OOP hash.  These things made it simpler to control 
 the session since it is just a basic Perl object and will 
 allow us to change the implementation in the future if need 
 be since it is completely encapsulated (aka no fussing with 
 POE events outside the object's internal implementation).
 
 I am still attempting to get the organization to allow me to 
 release it, that or I may build my own from scratch and 
 incorporate it into another app that I can release :-).  But 
 there is no timeline for all of that...
 

Thanks for sharing your thoughts.

Watching a directory for incoming files is very common need
In organization like Telecom Mobile Operator (my current job).
We have to deal with proprietary systems (Nokia, Siemens, Alcatel).
Sometimes the only interaction that you have with those systems is
to watch a predefined directory to see if a new file has been created by those black 
boxes.
Then start a process which treat the file's content
(Billing or CDR (Call Details Records) in general ).
Since the treatment can take long time, you need multitask behavior.

We have developed perl scripts to do the job but without POE.
I always thought that POE could provide a better alternative.

Learning POE is in my pipe for a while
But still not have time to start :).

Thanks again,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: installing DBI on HPUX

2004-05-10 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Christian Stalp [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 10, 2004 12:44 PM
 To: [EMAIL PROTECTED]
 Subject: installing DBI on HPUX
 
 
 Hello together,
 I have a problem! I use a HP-PaRisc Server with HPUX 10.20 
 and I just tried to install the DBI-module for Perl.
 
 After calling: perl Makefile.PL I got this warning:
 Warning: prerequisite Test::More failed to load: Can't locate 
 Test/More.pm in 

It seems that you don't have Test::More module installed.
Install Test::More first then install DBI.

An alternative is to use the CPAN module which will auto-install
dependencies for you
http://search.cpan.org/~timb/DBI-1.42/lib/Bundle/DBI.pm

Good luck,

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Problem using File::RsyncP module

2004-05-10 Thread NYIMI Jose (BMB)

-Original Message-
From: BERTHOLD Jean [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 08, 2004 3:45 PM
To: [EMAIL PROTECTED]
Cc: BERTHOLD Jean
Subject: Problem using File::RsyncP module

[snip]

I have never used File::RsyncP module but here
Are some of the thinks that raised doubt to me:
Do not comment the
use strict;
;)

#$rs-remoteStart(0, [EMAIL PROTECTED]::PWJA_arc);

The doc of File::RsyncP said :

$rs-remoteStart(0, destDirectory);

Your [EMAIL PROTECTED]::PWJA_arc arg is not like a directory
and should be between single quote if it was a correct argument.


#$rs-go($srcRep);
#$rs-serverClose;

#$rs-serverConnect(udaipur, 873);
#$rs-serverService(PWJA_arc, , , 0);

The doc said:
$rs-serverService($module, $authUser, $authPasswd, 0);
You provided an empty user and an empty password, strange !

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: installing DBI on HPUX

2004-05-10 Thread NYIMI Jose (BMB)

 -Original Message-
 From: Christian Stalp [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 10, 2004 1:27 PM
 To: [EMAIL PROTECTED]
 Cc: David Dorward
 Subject: Re: installing DBI on HPUX
 
 
 I tryed it at another way. I got an older version: DBI-1.21 
 because I still 
 use perl 5.6 not 5.6.1!
 
 perl Makefile.pl works, all is fine.
 
 But now I get this:
 
 (Bundled) cc: warning 480: The -A option is available only 
 with the C/ANSI C 
 product; ignored.

I have done a quick search and these treads seems interesting to you:

http://www.bitmechanic.com/mail-archives/dbi-users/Mar1998/0777.html
my_paste
I got the same errors the first time I compiled DBI.
My solution was to install gcc and recompile perl.
My system was a bare-bones HP-UX 10.20.
It sounds like you are useing the brain-dead cc that comes with HP.
/my_paste

http://www.mail-archive.com/[EMAIL PROTECTED]/msg16347.html
my_paste
You either need the HP ANSI C compiler or GCC. Since you seem to use a perl
which was build using the HP ANSI C compiler it's easiest to install that
compiler on the system you're trying to get DBI to work. However, you need
to PAY for that compiler so you might want to switch to GCC. I'm not
entirely sure if you would need to recompile perl itself with GCC for that
to work. (would be best no doubt)
/my_paste


HTH,

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: How to write a Perl module

2004-05-07 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Owen [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 07, 2004 5:40 AM
 To: [EMAIL PROTECTED]
 Subject: How to write a Perl module
 
 
 
 As an exercise in making an LDP How-To as well as confirming 
 my own limited knowledge of making a Perl module I wrote.
 
  http://www.pcug.org.au/~rcook/PerlModule_HOWTO.html
 

Your doc has a nice presentation (look) , congratulations! ;)
It's seems that you have used DocBook to produce it. Is that true ?
Could you share some doc ressources/links about DocBook.
The ones I know is:
http://docbook.sourceforge.net/

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: How to write a Perl module

2004-05-07 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Jenda Krynicky [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 07, 2004 12:32 PM
 To: [EMAIL PROTECTED]
 Subject: Re: How to write a Perl module
 
 
 From: Owen [EMAIL PROTECTED]
  As an exercise in making an LDP How-To as well as confirming my own 
  limited knowledge of making a Perl module I wrote.
  
   http://www.pcug.org.au/~rcook/PerlModule_HOWTO.html
  
  It is for beginners, just do this and it should work without any 
  explanation.
 
 Abstract:
   s/should be place in a module/should be placed in a module/
 
 Section 5.1
   s/#user perl Makefile.PL/user# perl Makefile.PL/
 
 The intro is almost longer than the real stuff. Is all this 
 legalistic chatter really necessary in such a short document?
 
 Also you should include pointers to Perl manual pages explaining the 
 details

Yes, as you did at http://jenda.krynicky.cz/perl/CPANppm.html ;)

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Line number variable....

2004-05-07 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Gabor Urban [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 07, 2004 12:57 PM
 To: [EMAIL PROTECTED]
 Subject: Line number variable
 
 
 Hi,
 
 I was going through the manuals some times, but could not 
 find it. Is there a variable containing the actual 
 source-line number during execution? 
 

Yes, the $.

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Line number variable....

2004-05-07 Thread NYIMI Jose (BMB)

 -Original Message-
 From: Paul Johnson [mailto:[EMAIL PROTECTED] On Behalf Of Paul Johnson
 Sent: Friday, May 07, 2004 1:20 PM
 To: NYIMI Jose (BMB)
 Cc: Gabor Urban; [EMAIL PROTECTED]
 Subject: Re: Line number variable
 
 
 On Fri, May 07, 2004 at 01:01:01PM +0200, NYIMI Jose (BMB) wrote:
 
   -Original Message-
   From: Gabor Urban [mailto:[EMAIL PROTECTED]
   
   I was going through the manuals some times, but could not
   find it. Is there a variable containing the actual 
   source-line number during execution? 
  
  Yes, the $.
 
 Sounds more like __LINE__ to me, though this is a token 
 rather than a variable.

Sorry, you right ...
Ignore my previous post.

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Perl vs PHP

2004-04-22 Thread NYIMI Jose (BMB)
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 22, 2004 3:01 PM
 To: [EMAIL PROTECTED]
 Subject: Perl vs PHP
 
 
 Why would one prefer PHP over PERL, or vice, versa?  I'm 
 guessing PERL has more functionaltiy and is more robust.  
 What are the technical arguments for one over the other? JP

Got from
http://www.masonbook.com/book/chapter-1.mhtml#TOC-ANCHOR-13

my_paste

It is important to understand some of the properties of PHP before
deciding to use it. One of the design goals of PHP is to be as simple as
possible to install and start using, and in some cases this means that
features that experienced Perl programmers rely on are not present. For
instance, PHP lacks support for private namespaces, there is no way to
create three-tiered applications that separate business logic and
presentation code, and there is no mechanism for creating reusable code
modules. The Apache mod_php module is only a content generation module,
so it cannot cooperate with other request phases in the same way Mason
can cooperate with mod_perl's authentication or filename translation
phases.3 Importantly, although there is a lot of user-contributed code
in the PHP world, it cannot match the breadth and depth of Perl's CPAN.
It has often been said that the CPAN is Perl's killer app, and
programmers most appreciate the CPAN when they least expect it. 

Finally, although you can theoretically use PHP for general-purpose
programming, it wasn't designed for that. PHP is typically used only for
embedding PHP code into templates, whereas Perl is a full-featured
programming language used for more purposes than any single programmer
could imagine. While this does make PHP well-suited for the common tasks
of web scripting, it may be limiting. For instance, a certain Perl
programming friend was recently contracted to write a simple shopping
cart system that had one small addition: it had to do some horribly
complex optics calculations. For situations like these, a
general-purpose programming language like Perl can be quite handy. 

/my_paste



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




[OT] last day of a month

2004-04-06 Thread NYIMI Jose (BMB)
Hello,

How to get the last day of a month using a korn shell command ?
So far I found the following :

echo `cal 12 2004` | awk '{print $NF}'

Do you have alternative ?

Thanks in advance for your input.

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.



RE: [OT] last day of a month

2004-04-06 Thread NYIMI Jose (BMB)
 -Original Message-
 From: Randy W. Sims [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 06, 2004 10:14 AM
 To: NYIMI Jose (BMB)
 Cc: [EMAIL PROTECTED]
 Subject: Re: [OT] last day of a month
 
 Your question is off-topic. If you want to know how to do it 
 with perl, 
 use the DateTime module. Otherwise, your question would be best asked 
 somewhere else.

I know that my question is off-topic that's why my subject starts whith the [OT] flag.
I thought that a lot of people using Perl are also familiar with unix scripting and 
hoped
someone could help me.
Unfortunately I can not use a Perl solution, it's a requirement :-)

Any idea is welcome.

José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Passing Data Between Servers

2004-03-05 Thread NYIMI Jose (BMB)
Good input David ...

Paul,
You should ask yourself which kind of communication you want between your *client* and 
*server*:
Synchronous or Asynchronous ?

I will personally choose an asynchronous communication for this kind of needs.
(client doesn't need to wait a reply from server).

José.

-Original Message-
From: David le Blanc [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 05, 2004 9:59 AM
To: perl
Subject: RE: Passing Data Between Servers



Aha!

I always wanted to rewrite MQSeries.  This might be the opportunity!


Do you want to use TCP SOCKETS, or can you 'email' the data
to the other server?

I ask, because TCP-SOCKETS depend on evrything being available at the time you want 
it, and you have to handle your own 
connection problems manually.  If you can email the data, you have a proven delivery 
mechanism to base the rest of your code on.

Then your server code is run by placing '|myperlcode -w' into 
a '.forward' files.
 

Regards,

David le Blanc

--  
Senior Technical Specialist 
I d e n t i t y   S o l u t i o n s 

Level 1, 369 Camberwell Road, Melbourne, Vic 3124   
Ph 03 9813 1388 Fax 03 9813 1688 Mobile 0417 595 550
Email [EMAIL PROTECTED] 
 

 -Original Message-
 From: Paul Kraus [mailto:[EMAIL PROTECTED]
 Sent: Friday, 5 March 2004 7:38 AM
 To: 'perl'
 Subject: Passing Data Between Servers
 
  I have a sco server which I hate to work on and I do not
 have full admin
  rights to. (We don't own it).
  
  I would like to be able to take any data that is sent to a
 perl script and
  then just send out to another perl script that would be
 waiting to accept
  it.
  
  Then based on the contents of input lunch another perl
 script and send in
  the data.
  
  I know this is vague but I will give you a for instance.
  
  Are archaic software is going to print an order out to a
 text file that is
  piped rather then written to a perl script. I want that the
 script to then
  send it to my linux server (Maybe with a daemon or
 something just waiting
  for input) which then would see it read the first line
 which tell it that
  hey we need to parse this data into this postscript
 template and then send
  it off using sendfax(Hylafax). That parsing and send would
 be its own
  script.
  
  The linux server would need to be able to accept more then
 1 transaction
  at a time.
  
  Any help would be greatly appreciated.
  
  TIA,
  
   Paul Kraus
   ---
   PEL Supply Company
   Network Administrator
   ---
   800 321-1264 Toll Free
   216 267-5775 Voice
   216 267-6176 Fax
   www.pelsupply.com
   ---
 
 
 
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 http://learn.perl.org/ http://learn.perl.org/first-response
 
 
 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Exit

2004-03-04 Thread NYIMI Jose (BMB)
Thanks Rod for your great help in this list.
I was always impressed by your elegant coding.
You are one the best Perl Programmer I have seen.
And I learned a lot from you, thanks !

Wish you all the best for the future ...

José.

-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 03, 2004 7:18 PM
To: [EMAIL PROTECTED]
Subject: Exit


I hope, and think, that I've helped several people to
be more eloquent in Perl.

The language fascinates me in the way that nearly all
who can speak can use it: thanks to Larry, who knew
before we did what a programming language should have been.

I remain available through my email address, but I have
other, rather sad things to do. Thank you all for your intelligent questions and 
elaborations.

/R



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Exit

2004-03-04 Thread NYIMI Jose (BMB)
Thanks Rob for your great help in this list.
I was always impressed by your elegant coding.
You are one the best Perl Programmer I have seen.
And I learned a lot from you, thanks !

Wish you all the best for the future ...

José.

-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 03, 2004 7:18 PM
To: [EMAIL PROTECTED]
Subject: Exit


I hope, and think, that I've helped several people to
be more eloquent in Perl.

The language fascinates me in the way that nearly all
who can speak can use it: thanks to Larry, who knew
before we did what a programming language should have been.

I remain available through my email address, but I have
other, rather sad things to do. Thank you all for your intelligent questions and 
elaborations.

/R



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Problm encountered in using DBI

2004-03-04 Thread NYIMI Jose (BMB)
Try following commands and tell us what you see for each of them:

1)
ldd -s /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Oracle/Oracle.so

2)
perl -v

3)
/usr/local/bin/perl -v

4)
perl -e 'use DBD::Oracle;'

5)
/usr/local/bin/perl -e 'use DBD::Oracle;'


José.
-Original Message-
From: Nilay Puri, Noida [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 04, 2004 12:46 PM
To: Urvashi Mishra
Cc: Perl List (E-mail)
Subject: RE: Problm encountered in using DBI


No, I am on Sun Solaris m/c

And i have find out that I have libclntsh.so while the errro that script throws is for 
libclntsh.so.1.0 So, any hint how to go about it Solaris experts ?

thanks

-Original Message-
From: Urvashi Mishra [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 5:04 PM
To: Nilay Puri, Noida
Subject: Re: Problm encountered in using DBI


If u are working in windows .. then i guess you have t6o do system dsn settings...

- Original Message -
From: Nilay Puri, Noida [EMAIL PROTECTED]
To: Perl List (E-mail) [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 4:45 PM
Subject: Problm encountered in using DBI


 Hi All,

 I am trying to connect to ORACLE thru perl
 I have included use DBI.

 On running script I get this error .

 install_driver(Oracle) failed: Can't load

'/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Oracle/Oracle.so
 ' for module DBD::Oracle: ld.so.1
 : /usr/local/bin/perl: fatal: libclntsh.so.1.0: open failed: No such 
 file or directory at 
 /usr/local/lib/perl5/5.00503/sun4-solaris/DynaLoader.pm line 169.

 So, i guess libclntsh.so.1.0 is not present in the UNXI box.

 When i searched for it, i was not able to find it.


 I am rigth in my approach to the problem, how do i get the file in 
 first
of
 all.

 Thanks,
 Nilay

 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] 
 http://learn.perl.org/ http://learn.perl.org/first-response




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: iterating through hash of hash references

2004-03-03 Thread NYIMI Jose (BMB)

%$tabledesc-{$_} is confused ...

Try writing it like :

%{ $tabledesc-{$_} }

HTH,

José.

-Original Message-
From: Andrew Gaffney [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 03, 2004 2:50 PM
To: beginners
Subject: iterating through hash of hash references


I have a script which creates a hash where all the values are hash references. I'm 
trying 
to iterate through the original hash and down into the anonymous hashes to make sure 
my 
code is doing what I think it's doing. My problem comes in at those nested foreach 
loops 
before the DB disconnect. I get the error:

Using a hash as a reference is deprecated at ./modtables.pl line 24. Type of arg 1 to 
keys must be hash (not hash element) at ./modtables.pl line 24, near })

code
#!/usr/bin/perl

use Skyline; # Custom module
use strict;
use warnings;

my @tables;
my $dbh = init_db(); # Custom function to connect to MySQL DB my ($sth, $ref, 
$tabledesc);

get_table_list();
foreach (@tables) {
   $tabledesc = {};
   $sth = $dbh-prepare(DESCRIBE $_);
   $sth-execute;
   while($ref = $sth-fetchrow_hashref) {
 $tabledesc-{$ref-{Field}} = {type= $ref-{Type},
null= $ref-{Null},
key = $ref-{Key},
default = $ref-{Default},
extra   = $ref-{Extra} };
   }
   foreach (keys %$tabledesc) {
 foreach (keys %$tabledesc-{$_}) {
   print $_ = $tabledesc-{$_}, ;
 }
 print \n;
   }
}
$dbh-disconnect();

sub get_table_list {
   $sth = $dbh-prepare(SHOW TABLES);
   $sth-execute;
   while($ref = $sth-fetchrow_hashref) {
 push @tables, $ref-{'Tables_in_skyline'} if($ref-{'Tables_in_skyline'} =~ 
/^m\d{6}$/);
   }
}
/code

-- 
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.
636-357-1548


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Perl / Tk Gui Toolkit?

2004-02-25 Thread NYIMI Jose (BMB)
Search tk from
http://lists.perl.org

José.


-Original Message-
From: John [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 25, 2004 2:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Perl / Tk Gui Toolkit?


Do you know any major malling list or forum concerning the Perl/Tk ?


- Original Message - 
From: Benjamin Walkenhorst [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 3:04 PM
Subject: Re: Perl / Tk Gui Toolkit?


 Hello,
 
 I recently started learning Perl/Tk. My primary system is FreeBSD 5.2, 
 on which Perl/Tk works fine. At work, I have to use windows, 
 unfortunately, but it works fine, too, under Windows. I don't see why 
 it should not work with Solaris.
 
 So far, I like Perl/Tk very much. I did not have any prior experience 
 in writing graphical interfaces, but Tk makes this *very* easy. 
 There's lots of tutorials available online. If you want a printed 
 book, Mastering Perl/Tk is available from O'Reilly. In my opinion 
 it's very good. Perl/Tk also comes with good documentation (perldoc Tk 
 / perldoc Tk::widget).
 
 Tk is part of ActivePerl by default, under windows. Under Solaris ... 
 uh, I don't know, but Perl is quite probably installed along with the 
 system, so you just check CPAN for Perl/Tk.
 
 Otherwise, I briefly touched GtkPerl, but I did not like it as much. 
 Tk is very intuitive to use, in my view, plus it's probably most 
 widely available. I don't think many windows-systems have a 
 Gtk-library installed... (And, of course, I like the minimalistic, 
 Unix-like look I get under... well, Unix-systems. It's  a shame in my 
 view that Tk now uses the native windows-look under Win32, but that's 
 a matter of taste.)
 
 Kind regards,
 
 Benjamin
 
 --
 If you want to know what god thinks of money, just look at the people
 he gave it to.
 -- Dorothy Parker
 
 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 http://learn.perl.org/ http://learn.perl.org/first-response
 
 
 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: perl and application server..

2004-02-16 Thread NYIMI Jose (BMB)
Hello,

Give a look to this article from perl.com
I contains a lot of interesting infos related to your question:

http://www.perl.com/lpt/a/2001/10/17/etoys.html

HTH,

José.

-Original Message-
From: Joe Echavarria [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 13, 2004 9:25 PM
To: [EMAIL PROTECTED]
Subject: perl and application server..


Hi there,

  Is there a way to work with perl as a Java, with and application server in other to 
separate the presentation from the business logic ?,  Thanks for any help.

__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online. 
http://taxes.yahoo.com/filing.html

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Use Strict Error

2004-01-23 Thread NYIMI Jose (BMB)
1. You are missing ; 
Type
`egrep $name testing.txt`;
And not
'egrep $name testing.txt'

Not the backticks and not quotes ...

HTH,

José.

-Original Message-
From: Bill Jastram [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 4:00 PM
To: [EMAIL PROTECTED]
Subject: Use Strict Error


When I use the following portion of Perl code: 
__

#!/usr/bin/perl
# use with:
# perl IfThenElse tfcfam (Use all of this at the command line!)

use strict;
use warnings;

print Search by name: ;

my $name = STDIN;
'egrep $name testing.txt'

#my(@col1, @col2, @col3);
my @col1;
my @col2;
my @col3;
my $col = 1;
my ($find);

__

I get the following error:

syntax error at trashthistest2 line 17, near my  
Global symbol @col1 requires explicit package name at trashthistest2 line 17. 
Global symbol@col1 requires explicit package name at trashthistest2 line 40. 
Global symbol @col1 requires explicit package name at trashthistest2 line 53. Global 
symbol @col1 requires explicit package name at trashthistest2 line 59. 
Global symbol @col1 requires explicit package name at trashthistest2 line 81. 
Execution of trashthistest2 aborted due to compilation errors.

__

If I have declared my @col1 at line 17, why am I getting these errors?

Thanks for any assitance you can offer.

Bill J.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Loading libraries into a static Perl

2004-01-22 Thread NYIMI Jose (BMB)
Try pp (Perl Packager):
http://search.cpan.org/~autrijus/PAR-0.79/script/pp#NOTES

C:pp -o our.exe our.pl

More info at:
http://par.perl.org/ 

HTH,

José.

-Original Message-
From: Shawn Sharp [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 21, 2004 9:06 PM
To: [EMAIL PROTECTED]
Subject: Loading libraries into a static Perl


Hey,

 

I am trying to create a stand alone (static) program in Perl (no shared libraries).  I 
have tried perlcc -L /lib perl.pl but am not have any luck. This will create an 
executable but you still need the shared libraries.  I have also typing in the path of 
each library (ie perlcc -L /lib/libperl.so -L /lib/libns1.so.1 perl.pl) This complied 
the perl program the same.

 

Any Ideas.

 

Thanks

 

 

 



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: New to PERL and Need Help

2004-01-13 Thread NYIMI Jose (BMB)
A good starting place is :
http://learn.perl.org/

HTH,

José.

-Original Message-
From: KENNETH JANUSZ [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 13, 2004 2:57 PM
To: PERL Beginners
Subject: New to PERL and Need Help


I am new to the world of PERL and need help to get started.  I have the book: PERL 
for Oracle DBA's.  But this has not helped me get started.  My background is Oracle 
as a DBA.  I have a good background with SQL*Plus and PL/SQL.  On my home PC I have XP 
Prof. and Oracle 9.2.  My Oracle supports PERL but I cannot get it to work.  It is not 
the latest release of PERL, but that is not a problem.  When I can get it to work I 
can update at that time.

Any help with books for beginners or web sites will be greatly appreciated.  Keep it 
very simple.

Thanks much,
Ken Janusz, CPIM


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Question about subroutines....

2004-01-13 Thread NYIMI Jose (BMB)
Yes it is !

C:\perldoc -q How do I pass filehandles between subroutines
Found in C:\Perl\lib\pod\perlfaq5.pod
  How can I make a filehandle local to a subroutine?  How do I pass
filehandles between subroutines?  How do I make
 an array of filehandles?
As of perl5.6, open() autovivifies file and directory handles as
references if you pass it an uninitialized scalar variable. You can
then
pass these references just like any other scalar, and use them in
the
place of named handles.

open my$fh, $file_name;

open local $fh, $file_name;

print $fh Hello World!\n;

process_file( $fh );

Before perl5.6, you had to deal with various typeglob idioms which
you
may see in older code.

open FILE,  $filename;
process_typeglob(   *FILE );
process_reference( \*FILE );

sub process_typeglob  { local *FH = shift; print FH
Typeglob! }
sub process_reference { local $fh = shift; print $fh
Reference! }

If you want to create many anonymous handles, you should check out
the
Symbol or IO::Handle modules.


C:\

-Original Message-
From: Gabor Urban [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 13, 2004 3:46 PM
To: [EMAIL PROTECTED]
Subject: Question about subroutines


Hi,

Is it possible to write a subroutine in Perl which accepts an open file
handle as parameter? At the moment it seems hopeless, but is it?

Regards

Gabaux
Linux is like a wigwam: no gates, no windows, and an apache inside!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Perl sockets on an HPUX

2004-01-09 Thread NYIMI Jose (BMB)
You can get it From CPAN
http://search.cpan.org/

Just my favour,
There is Net::EasyTCP module which offers
an elegant API on top of IO::Socket.

See:
http://search.cpan.org/~mnaguib/EasyTCP-0.25/EasyTCP.pm#SYNOPSIS

José.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 09, 2004 4:39 PM
To: Goffredo Saffioti
Cc: [EMAIL PROTECTED]
Subject: Re: Perl sockets on an HPUX 


Great where do I get this IO::Socket module?

thank you

Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams






Goffredo Saffioti [EMAIL PROTECTED]
01/09/2004 12:52 PM

 
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: Perl sockets on an HPUX 


[EMAIL PROTECTED] ha scritto:

People of the Perl,

does anyone have a perl program that will create a socket ( srwxr-xr-x 
)
for a HPUX 11.0 system?  I am in need of this!  I have looked into system 
calls such as mknod and mkfifo and these are not capable of creating
these 
special files.

Thanks!

Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams


 

 This is a socket in perl u can declare a socket in the form: $sock = Yuo need the 
module use IO::Socket;

 $sock = IO::Socket::INET-new(PeerAddr = $server, 
 
   PeerPort = $port,
   Proto = 'tcp');

Not so distant by C socket :-) .
You can try this sochet with this simple script underneath
it's a simple tcp port scanner .
Hope this can help u.
Cya.

Go.


#!/usr/bin/perl -w
use IO::Socket;
use strict;
 
my ($line, $port, $sock, $range,  $splitted, @servers, @splitted); my $VERSION='1.0';
 
my $pid = 0;
my($server, $begin, $end, $processes) = @ARGV;
 

usage if (!$server);
$begin = 0 if (!$begin);
$end = 65000 if (!$end);
$processes = 2 if ((!$processes) || ($processes2));
 
 
print Scanning from $begin to $end\n;
 
 
for ($port=$begin;$port=$end;$port++) {
scan;
 
 if ($sock){
print Connected on port $port\n;
}
else{
print $port not connected\n;
}
}
 
sub usage{
print Usage: portscan hostname [start at port number]\n;
exit(0);
 
}
sub scan{ 
 
 $sock = IO::Socket::INET-new(PeerAddr = $server, 
 
   PeerPort = $port,
   Proto = 'tcp');
}


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response






 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Fixed Length Text Extract, Write to Excel

2004-01-07 Thread NYIMI Jose (BMB)
while(my($key,$val)=each %item){
#do stuff
}

HTH,

José.

-Original Message-
From: William Martell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 07, 2004 6:46 PM
To: R. Joseph Newton; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Fixed Length Text Extract, Write to Excel


Thanks for your reply Joseph,  I am reading perlref now.  If you can offer some 
pointers on how to access the key value pairs of the reference object %item.  I would 
appreciate it.


- Original Message -
From: R. Joseph Newton [EMAIL PROTECTED]
To: William Martell [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 11:20 AM
Subject: Re: Fixed Length Text Extract, Write to Excel


 William Martell wrote:

  Hello All,
 
  I am trying to work with the code I have to extract fields from a 
  text
file report, and write the values into excel.
 
  I am having trouble.
 
  When I get to push @order_detail, %item
  I understand that this is pushing an associative array onto a list.
(array
  of hashes)

 That is the problem,  a list cannot contain a hash.  The keys and 
 values
of the hash simply become flattened into list
 elements, and all the hashing magic is lost.

 perldoc perlref

 will explain how references can help resolve this problem..

 Joseph



 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] 
 http://learn.perl.org/ http://learn.perl.org/first-response



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Running command from string variable as if part of script

2003-12-22 Thread NYIMI Jose (BMB)
I'm wondering if you really need
to read a script into an array ?
Ugly for me ;)

José.

-Original Message-
From: Tushar Gokhale [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 22, 2003 1:36 PM
To: [EMAIL PROTECTED]
Subject: Running command from string variable as if part of script


I'm reading another perl script into array and want to commands from the the array as 
if normal perl commands. How do I do it?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: deallocating?

2003-12-21 Thread NYIMI Jose (BMB)
Yes, you right.

José.

-Original Message-
From: R. Joseph Newton [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 21, 2003 6:18 PM
To: NYIMI Jose (BMB)
Cc: christopher j bottaro; [EMAIL PROTECTED]
Subject: Re: deallocating?


NYIMI Jose (BMB) wrote:

 Did you read this ? 
 http://www.perl.com/lpt/a/2002/08/07/proxyobject.html

 José.

Hi Jose,

Actually, if christopher is accurately reporting his class structures, this article 
should not relate.  He reports only one-way references, wherein Mommy watches her 
kids, and they need not concern themselves with her identity.  Therefore, there is no 
circularity to dissolve.

All he needs to do is undef the root.

I think the disccusion, though, is taking on a circular aspect, since we covered this 
same territory sometime in the past couple weeks.

Joseph




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: where to look for modules?

2003-12-21 Thread NYIMI Jose (BMB)
Just type
perldoc lib

HTH,

José.
-Original Message-
From: christopher j bottaro [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 21, 2003 8:50 PM
To: [EMAIL PROTECTED]
Subject: Re: where to look for modules?


On Saturday 20 December 2003 05:05 am, Owen wrote:
 I think the easiest for you would be to;

 use Modules;  # as found in /usr/lib/perl5/5.8.0/

 use lib '/home/cjb/perlmodules';   #followed by
 use MyModule; #and/or any other module you have there

great, that worked perfectly...=)  i'm having a hard time finding 
documentation for use lib.  i looked at use in perlfunc and i also looked 
at perlmodlib.

thanks,
-- christopher

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: deallocating?

2003-12-20 Thread NYIMI Jose (BMB)
http://www.perl.com/pub/a/2002/08/07/proxyobject.html?page=3

José.

-Original Message-
From: christopher j bottaro [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 20, 2003 8:46 PM
To: [EMAIL PROTECTED]
Subject: deallocating?


just for practice, i made a class BinaryTree.  its just a blessed reference to 
a hash that contains two things:  size and root.  root gets assigned to a 
BinaryTree::Node which is just a bless reference containing: key, value, left, right.

perl deallocates according to reference counts.  so if i want destory my tree 
structure, i'd have to make sure there are no references to any of the 
BinaryTree::Node's, right?  something like this...

$my pr_clear;
$pr_clear = sub {
my $p = shift(); # parent node
my $w = shift(); # which child of the parent
my $n = shift(); # child node
if ($n != undef){
this-$pr_clear($n, left, $n-left());
this-$pr_clear($n, right, $n-right());
$p-$w(undef);
}
}

sub clear() {
this-$pr_clear(this-{root}, left, this-{root}-left());
this-$pr_clear(this-{root}, right, this-{root}-right());
this-{root} = undef;
}

thanks in advance, and thanks to those who helped with the module questions,
-- christopher

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: deallocating?

2003-12-20 Thread NYIMI Jose (BMB)
Did you read this ?
http://www.perl.com/lpt/a/2002/08/07/proxyobject.html

José.

-Original Message-
From: christopher j bottaro [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 20, 2003 8:46 PM
To: [EMAIL PROTECTED]
Subject: deallocating?


just for practice, i made a class BinaryTree.  its just a blessed reference to 
a hash that contains two things:  size and root.  root gets assigned to a 
BinaryTree::Node which is just a bless reference containing: key, value, left, right.

perl deallocates according to reference counts.  so if i want destory my tree 
structure, i'd have to make sure there are no references to any of the 
BinaryTree::Node's, right?  something like this...

$my pr_clear;
$pr_clear = sub {
my $p = shift(); # parent node
my $w = shift(); # which child of the parent
my $n = shift(); # child node
if ($n != undef){
this-$pr_clear($n, left, $n-left());
this-$pr_clear($n, right, $n-right());
$p-$w(undef);
}
}

sub clear() {
this-$pr_clear(this-{root}, left, this-{root}-left());
this-$pr_clear(this-{root}, right, this-{root}-right());
this-{root} = undef;
}

thanks in advance, and thanks to those who helped with the module questions,
-- christopher

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: mysql cgi admin and client

2003-12-16 Thread NYIMI Jose (BMB)
Try
http://www.gossamer-threads.com/scripts/mysqlman/index.htm

José.

-Original Message-
From: George Georgalis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 16, 2003 6:14 AM
To: [EMAIL PROTECTED]
Subject: Re: mysql cgi admin and client


After I wrote that, I made some good progress... notably: 
http://www.thedumbterminal.co.uk/software/webmysql.shtml

This might be good too, haven't tried http://sourceforge.net/projects/mysqltool/

// George

On 12/15/03, George Georgalis wrote:
Hi,

I thought there was something like myphpadmin (for mysql) in perl but 
I'm not finding it.

I'm looking for a perl or mod_perl cgi, to create (as admin) mysql 
database and tables, data entry interface and access client. Ideally 
template / css based. Lots of companies sell this sort og thing for 
under $40, but I suspect there is a GNU one out there?

// George


-- 
GEORGE GEORGALIS, System Admin/Architectcell: 646-331-2027IXOYE
Security Services, Web, Mail,mailto:[EMAIL PROTECTED] 
Multimedia, DB, DNS and Metrics.   http://www.galis.org/george 


-- 
GEORGE GEORGALIS, System Admin/Architectcell: 646-331-2027IXOYE
Security Services, Web, Mail,mailto:[EMAIL PROTECTED] 
Multimedia, DB, DNS and Metrics.   http://www.galis.org/george 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: copying complex data structures

2003-12-11 Thread NYIMI Jose (BMB)
Try clone method of Storable module from CPAN.
There is also Clone module out there.

HTH,

José.

-Original Message-
From: West, William M [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 11, 2003 4:37 PM
To: [EMAIL PROTECTED]
Subject: copying complex data structures




the following will not work:

$arrayref_one = $arrayreftwo; #it's just making a new name for the same
#reference.


the following works fine:

foreach my $a (0..$what){
foreach my $b (0..$why){
$arrayref_one-[$a]-[$b] = $arrayref_two-[$a]-[$b];

}
}

it would be nice to have something to copy complex data structures that isn't going to 
be a code maintenance headache-  the above is dependent on the data structure being a 
2 dimensional array of particular size. i don't want that restriction.

any help would be apreciated :)

thanks,
willy


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Can't find package AutoLoader in CGI::Application program

2003-12-08 Thread NYIMI Jose (BMB)
Try putting
1;
As the last line of your GroupRank.pm file.

Remember that a module (*.pm file) is
supposed to return a true value.

José.

-Original Message-
From: david [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 08, 2003 7:06 PM
To: [EMAIL PROTECTED]
Subject: Re: Can't find package AutoLoader in CGI::Application program


Jon Seidel wrote:

[snip]

 The beginning of my GroupRank.pm file looks like this: 
 /// package GroupRank;
 use base 'CGI::Application';
 use AutoLoader;
 #use DBI;
 
 use strict;
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
 $|++;

your GroupRank.pm module doesn't seem to return a true value. change '$|++;' 
to '$|=1;' and see what happen.

david
-- 
s,.*,,e,y,\n,,d,y,.s,10,,s
.ss.s.s...s.sss.s.ss
s.s.s...s...s..s
...s.ss..s.sss..ss.sss.s
s.s.s...ss.sss.s
..s..sss.s.ss.sss...
..ssss.sss.sss.s

,{4},|?{*=}_'y!'+0!$;
,ge,y,!#:$_(-*[./[EMAIL PROTECTED],b-t,
.y...,$~=q~=?,;^_#+?{~,,$~=~
y.!-*-/:[EMAIL PROTECTED] ().;s,;,
);,g,s,s,$~s,g,y,y,%,,g,eval

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ 
http://learn.perl.org/first-response




 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: rendering html from perl

2003-11-27 Thread NYIMI Jose (BMB)
Nice to read !

http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.



RE: symbol Perl_get_sv

2003-11-26 Thread NYIMI Jose (BMB)
Try ldd :

%ldd /mz/hd/liuyi/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/Tk/Event/Event.so
Or
%ldd -s 
/mz/hd/liuyi/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/Tk/Event/Event.so

my_paste

%man ldd
Reformatting page.  Please Wait... done

User Commands  ldd(1)

NAME
 ldd - list  dynamic  dependencies  of  executable  files  or
 shared objects

SYNOPSIS
 ldd [ -d | -r ]  [ -c ]  [ -e envar ]  [ -f ]  [ -i ]  [  -L
 ]  [ -l ]  [ -s ]  [ -u ]  [ -v ]  filename ...

DESCRIPTION
 The ldd utility lists the dynamic dependencies of executable
 files  or  shared  objects.  ldd  uses  the  runtime linker,
 ld.so.1, to generate the diagnostics,  since  it  takes  the
 object being inspected and prepares it as it would in a run-
 ning process. By default, ldd triggers the  loading  of  any
 lazy dependencies.

 If filename is an executable file, ldd lists the path  names
 of  all shared objects that would be loaded when filename is
 loaded.

 If filename is a shared object,  ldd lists the path names of
 all  shared  objects  that  would be loaded when filename is
 loaded. ldd expects shared objects to have  execute  permis-
 sion.  If  this  is  not  the case, ldd will issue a warning
 before attempting to process the file.

 ldd processes its input one file at a time.  For each  input
 file, ldd performs one of the following:

o  Lists the object dependencies if they exist.

o  Succeeds quietly if dependencies do not exist.

o  Prints an error message if processing fails.

OPTIONS
 ldd can also check the compatibility of  filename  with  the
 shared  objects it uses. With each of the following options,
 ldd prints warnings for  any  unresolved  symbol  references
--More--(13%)

\my_paste

HTH,

José.


-Original Message-
From: Ying Liu [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 26, 2003 5:16 AM
To: drieux
Cc: begin begin
Subject: Re: symbol Perl_get_sv


Thanks!

I am working on this, lots of new things (include what's meaning of 'You Are So 
Toast').

Actually, I follow the direction by 'perl -V', I got:
 Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R 
/usr/perl5/5.00503/sun4-solaris/CORE'
cccdlflags='-KPIC', lddlflags='-G'

then
%cd /usr/perl5/5.00503/sun4-solaris/CORE
%nm libperl.so | grep perl_get_sv
000403e0 T perl_get_sv

So, I use dynamic linking perl. I am wondering if it's because it searched the 
capatial letter 'P' not the little letter 'perl_get_sv'. Don't understand why dynamic 
linking version of Tk can't find it.

Not try 'c' and 'd' yet.

Thanks a lot,
Ying

On Tue, 25 Nov 2003, drieux wrote:


 On Tuesday, Nov 25, 2003, at 19:38 US/Pacific, R. Joseph Newton wrote: 
 [..]
 
  d.  Load Windows as the OS, install ActivePerl, and start working on 
  Perl instead of futzing with the underlying system.
 
  Joseph

 are you going somewhere with this?

 Or is the problem that you do not understand
 how dynamic loadable libraries work and hope
 that someone else will take care of the issue
 for you???


 ciao
 drieux

 ---


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: symbol Perl_get_sv

2003-11-26 Thread NYIMI Jose (BMB)
So ldd said all expected objects are there.
I was suspecting a missing one.
In that case ldd would say
libm.so.1 = not found
For instance.

Anyway, i noticed something that bother me in your post:
That is version of your perl on your machine:
5.8.0 and 5.00503

When for instance, you type
%perl -v

Make sure that you are using the perl you wanted.

On my WS:

%which perl
/usr/bin/perl

%perl -v
This is perl, version 5.005_03 built for sun4-solaris
[snip]

%/usr/local/bin/perl -v
This is perl, v5.6.1 built for sun4-solaris
[snip]


Put full pathname if necessary:
%/usr/local/bin/perl Makefile.pl


José.

-Original Message-
From: Ying Liu [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 26, 2003 4:08 PM
To: NYIMI Jose (BMB)
Cc: Ying Liu; drieux; begin begin; [EMAIL PROTECTED]
Subject: RE: symbol Perl_get_sv


Jose,

After I ran, it shows me:
 %ldd 
 /mz/hd/liuyi/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/Tk/Event/Event.so
libm.so.1 = /usr/lib/libm.so.1
libc.so.1 = /usr/lib/libc.so.1
libdl.so.1 =/usr/lib/libdl.so.1
/usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1

 Or
 %ldd -s 
 /mz/hd/liuyi/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/Tk/Even
 t/Event.so


So, those are the shared objects that would be loaded. And then, what am I supposed to 
do? Thanks, Ying



 my_paste

 %man ldd
 Reformatting page.  Please Wait... done

 User Commands  ldd(1)

 NAME
  ldd - list  dynamic  dependencies  of  executable  files  or
  shared objects

 SYNOPSIS
  ldd [ -d | -r ]  [ -c ]  [ -e envar ]  [ -f ]  [ -i ]  [  -L
  ]  [ -l ]  [ -s ]  [ -u ]  [ -v ]  filename ...

 DESCRIPTION
  The ldd utility lists the dynamic dependencies of executable
  files  or  shared  objects.  ldd  uses  the  runtime linker,
  ld.so.1, to generate the diagnostics,  since  it  takes  the
  object being inspected and prepares it as it would in a run-
  ning process. By default, ldd triggers the  loading  of  any
  lazy dependencies.

  If filename is an executable file, ldd lists the path  names
  of  all shared objects that would be loaded when filename is
  loaded.

  If filename is a shared object,  ldd lists the path names of
  all  shared  objects  that  would be loaded when filename is
  loaded. ldd expects shared objects to have  execute  permis-
  sion.  If  this  is  not  the case, ldd will issue a warning
  before attempting to process the file.

  ldd processes its input one file at a time.  For each  input
  file, ldd performs one of the following:

 o  Lists the object dependencies if they exist.

 o  Succeeds quietly if dependencies do not exist.

 o  Prints an error message if processing fails.

 OPTIONS
  ldd can also check the compatibility of  filename  with  the
  shared  objects it uses. With each of the following options,
  ldd prints warnings for  any  unresolved  symbol  references
 --More--(13%)

 \my_paste

 HTH,

 José.


 -Original Message-
 From: Ying Liu [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2003 5:16 AM
 To: drieux
 Cc: begin begin
 Subject: Re: symbol Perl_get_sv


 Thanks!

 I am working on this, lots of new things (include what's meaning of 
 'You Are So Toast').

 Actually, I follow the direction by 'perl -V', I got:
  Dynamic Linking:
 dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R 
 /usr/perl5/5.00503/sun4-solaris/CORE'
 cccdlflags='-KPIC', lddlflags='-G'

 then
 %cd /usr/perl5/5.00503/sun4-solaris/CORE
 %nm libperl.so | grep perl_get_sv
 000403e0 T perl_get_sv

 So, I use dynamic linking perl. I am wondering if it's because it 
 searched the capatial letter 'P' not the little letter 'perl_get_sv'. 
 Don't understand why dynamic linking version of Tk can't find it.

 Not try 'c' and 'd' yet.

 Thanks a lot,
 Ying

 On Tue, 25 Nov 2003, drieux wrote:

 
  On Tuesday, Nov 25, 2003, at 19:38 US/Pacific, R. Joseph Newton 
  wrote: [..]
  
   d.  Load Windows as the OS, install ActivePerl, and start working 
   on Perl instead of futzing with the underlying system.
  
   Joseph
 
  are you going somewhere with this?
 
  Or is the problem that you do not understand
  how dynamic loadable libraries work and hope
  that someone else will take care of the issue
  for you???
 
 
  ciao
  drieux
 
  ---
 
 
  --
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



  DISCLAIMER 

 This e-mail and any attachment thereto may contain information which 
 is confidential and/or protected by intellectual property rights and 
 are intended for the sole use of the recipient(s) named above. Any use 
 of the information contained herein (including, but not limited to, 
 total or partial reproduction

What is Inversion of Control (IoC)

2003-11-24 Thread NYIMI Jose (BMB)
Hello,

More and more my fellow Java's friends tell me about IoC.
What is IoC in Perl world ?
Examples ?

Here are some links about IoC a friend gave to me :
http://picocontainer.org/ioc.html
http://jakarta.apache-korea.org/avalon/framework/guide-patterns-ioc.html
http://www.springframework.org/docs/lightweight_container.html
http://javangelist.snipsnap.org/space/IoC

José.



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.



RE: Can't locate object method get via package LWP::UserAgent

2003-11-24 Thread NYIMI Jose (BMB)
I haven't seen where you said:
use LWP::UserAgent;

José.

-Original Message-
From: PerlDiscuss - Perl Newsgroups and mailing lists [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2003 6:50 AM
To: [EMAIL PROTECTED]
Subject: Can't locate object method get via package LWP::UserAgent



#!/usr/bin/perl

use strict;
use URI;
#use HTTP::Request::Common qw(GET);
use LWP;
#use HTTP::Response;

my $browser = LWP::UserAgent-new;
$browser-env_proxy();
my 
$response=$browser-get('http://finance.yahoo.com/d/quotes.csv?s=msftf=sl1d1t1c1ohgv');
print $response-content;

Can someone please tell me how to solve this error message when i type perl test.pl at 
the prompt. test.pl is the filename

Can't locate object method get via package LWP::UserAgent


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: What is Inversion of Control (IoC)

2003-11-24 Thread NYIMI Jose (BMB)
Hi Rob,

Indeed the question i had in mind while posting
was should i care about IoC while developping in Perl ?.
Your answer seems to be *no*.
Then how can i argue to my friends that
IoC is not often a good way to write stuff.
Have you some examples ?

José.


-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2003 11:51 AM
To: [EMAIL PROTECTED]
Subject: Re: What is Inversion of Control (IoC)


Nyimi Jose wrote:

 More and more my fellow Java's friends tell me about IoC. What is IoC 
 in Perl world ? Examples ?

 Here are some links about IoC a friend gave to me : 
 http://picocontainer.org/ioc.html 
 http://jakarta.apache-korea.org/avalon/framework/guide-patterns-ioc.ht
 ml
 http://www.springframework.org/docs/lightweight_container.html
 http://javangelist.snipsnap.org/space/IoC

Hi José.

This pairs nicely with Kevin's question about callbacks, because that's essentially 
what IoC is. In the classic model the code know all about the structure of the program 
as a whole and where to find the functions it needs. You will code your Perl program 
to call a particular member function from a specific package.

In IoC your code only needs to declare what it's able to do
and the lower-level software will decide when to call it.

In Joseph's 'sort' example in the 'What is a callback' thread the compare function 
just sets itself up, saying 'I can tell you which order a pair of values should be 
in'. It then sits back and waits to be summoned.

Another obvious IoC situation is in Windows programming, where the program is 
effectively just a fixed set of subroutines that Windows needs to call at the 
appropriate time.

But don't go trying to write code using IoC just because somebody's recently thought 
of a name for it. The idea's been around a long time and it isn't often a good way to 
write stuff.

HTH,

Rob



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: What is Inversion of Control (IoC)

2003-11-24 Thread NYIMI Jose (BMB)
rob
Ask your friends where they would use it and how and,
when they burble, just understand that they've simply hit on a fad.
/rob

Yes! I will do :-)

José.

-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2003 5:15 PM
To: [EMAIL PROTECTED]
Subject: Re: What is Inversion of Control (IoC)


Nyimi Jose wrote:

 Hi Rob,

 Indeed the question i had in mind while posting was should i care 
 about IoC while developping in Perl ?. Your answer seems to be *no*. 
 Then how can i argue to my friends that IoC is not often a good way 
 to write stuff. Have you some examples ?

As James says, it's not a language question: Perl can do callbacks too! But it's never 
a good idea to program according to this month's buzzword. It's an advanced decision 
to choose IoC over normal threaded code. 

Rob



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: rendering html from perl

2003-11-20 Thread NYIMI Jose (BMB)
Have a look to :
http://www.masonhq.com/

José.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 20, 2003 11:45 AM
To: [EMAIL PROTECTED]
Subject: RE: rendering html from perl


On Friday, Nov 14, 2003, at 02:29 US/Pacific, [EMAIL PROTECTED] 

wrote:



 When writing HTML in perl can you interpolate the html with perl code

 or do you have to write the whole script in perl with each tag within

 a prel print() function.  The importance of this is layout, nested

 tables,

 design view in Dreamweaver etc etc - Dreamweaver 4 cannot render the

 code

 in design view.



From: drieux [mailto:[EMAIL PROTECTED]

Sent: 15 November 2003 17:13



I'm not sure I follow what you mean by 'interpolate the html'.



Allow me to illustrate, I have a piece of perl cgi code

that I use to simplify my bloging,



[jeeves: 59:] lwp-request http://www.wetware.com/drieux/PR/blog2/Code/

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN

 http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd;

html lang=en

head

 meta http-equiv=content-type content=text/html; 

charset=iso-8859-1

 titlePerl One, Code Two, it is knitting/title

base href=http://www.wetware.com/drieux/PR/blog2/Code/;

 META http-equiv=Cache-Control content=no-cache

 META http-equiv=Pragma content=no-cache

/head

frameset rows=122,* 

   frame name=BlogHead src=header.html

 frameset cols=120,*frame name=VertNav 

src=../bin/vertNav.cgi?dir=Code

 frame name=BlogSpace src=200311.html

 /frameset

/frameset

/html[jeeves: 60:]



everything gets set up and then a Print Statement sends

the whole scalar $page out the door. As you will note,

the above sets up 'framesets' and as such would require

the browser to make all of the additional calls, and

then based upon what the browser is doing, render that

for the human to see.



So, please help us help you.



ciao

drieux



Hi Drieux and thanks for the subject line, which I forgot in the effort to avoid legal 
notices/footers.



Here is an example of what I do in php:



body

?

if($x=1){print(this)}else{print(that);}

?

font size=1Print this anyway/font

/body



The code bits are executed on the server of course.  Is there an equivalent of the ? 
? tags to start and stop code writing in perl?



Thanks,



John

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: beginners oops module

2003-11-17 Thread NYIMI Jose (BMB)
ch3 of Object Oriented Perl book by Conway is free at
http://www.manning.com/getpage.html?project=conwayfilename=Chapters.html

Great reads !

José.
-Original Message-
From: km [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2003 12:14 PM
To: [EMAIL PROTECTED]
Subject: beginners oops module


Hi all,
i wanna look at the (source code of) modules which give  a basic understanding of  
OOPS programming style in Perl. any pointers will be helpful . thanks, KM




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Help Required

2003-11-14 Thread NYIMI Jose (BMB)
perldoc CGI
See section : GENERATING A REDIRECTION HEADER

my_paste

GENERATING A REDIRECTION HEADER

print $query-redirect('http://somewhere.else/in/movie/land');

Sometimes you don't want to produce a document yourself, but simply redirect the 
browser elsewhere, perhaps choosing a URL based on the time of day or the identity of 
the user.

The redirect() function redirects the browser to a different URL. If you use 
redirection like this, you should not print out a header as well.

One hint I can offer is that relative links may not work correctly when you generate a 
redirection to another document on your site. This is due to a well-intentioned 
optimization that some servers use. The solution to this is to use the full URL 
(including the http: part) of the document you are redirecting to.

You can also use named arguments:

print $query-redirect(-uri='http://somewhere.else/in/movie/land',
   -nph=1);
The -nph parameter, if set to a true value, will issue the correct headers to work 
with a NPH (no-parse-header) script. This is important to use with certain servers, 
such as Microsoft Internet Explorer, which expect all their scripts to be NPH.

/my_paste

José.
 

-Original Message-
From: Amit Sharma [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 14, 2003 7:01 AM
To: [EMAIL PROTECTED]
Subject: Help Required


Hi,
   I have written one cgi script which gets the input from user and modify one xml 
file and I got this string  as output 
http://prv-arweb3.Test.com/Remedy/servlet/Servlet?URL=http://asharma.Test.co
m/Query1.xmlTURL=http://asharma.Test.com/Remedy1.xsl

Here I am getting modified Query1.xml as input and I have to give this command in 
address bar to get the desired result. Could you please help me to let me know how 
directly through CGi I can go to the address mentioned above without copying and 
pasting in address bar. This address will always remain the same only the xml file 
will change.

General Question:

In my cgi script I want to open some site let us suppose http://www.google.com

How can I do that.

Regards,
Amit.














-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How do you dynamically assign array names?

2003-11-14 Thread NYIMI Jose (BMB)
To complete previous posts, have a look to this:

Subject:  Why it's stupid to `use a variable as a variable name'
http://perl.plover.com/varvarname.html

José.

-Original Message-
From: Douglas Houston [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 14, 2003 4:55 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: How do you dynamically assign array names?


Hi,

I am trying to initialize a dynamically-named array, i.e. with the following test code 
(if I type script.pl char at the command prompt) I get the message array char 
contains 1 2 3 but I get a warning if 'use strict' is on. Can anyone show me how it 
should be done (I would like to use 'use strict'!)?

#!/usr/bin/perl -w
#use strict;
my ($string);

while ($ARGV[0]) {
  chomp($string=$_);
  @$string = (1,2,3);  #Won't work if 'use strict' pragma is used }

print array $string contains @$string\n;


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Need help on perl graphical interface

2003-11-06 Thread NYIMI Jose (BMB)
About the design:
you should yourself ask this question:
should i biuld a UI from scratch with Tk module or
should i consider biulding a web application (browser as client).

Investigate if a web application will meet your requirements ...

José.

-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 06, 2003 4:44 PM
To: [EMAIL PROTECTED]
Subject: Re: Need help on perl graphical interface


Pandey Rajeev-A19514 wrote:

 I don't know anything about perl graphics. I would
 explain excatly what I want.

 I want to develope a interactive graphical interface
 which can display all the nodes in a network in a
 tree representation. I should be able to draw that
 tree upon reading a data base (or real time data).

 I should be able to click on to a particular node
 in that network and should be able to do what I
 wish on that node( i.e. to make it interactive and
 what I wish to do is not that important right now).

 Can any one tell me is it possible in perl ?
 I have the necessary backend support in perl.

Perl on its own has no graphical capability, but almost anything is possible via its 
modular extensions.

Check out the module

  Tk - a graphical user interface toolkit for Perl

but beware that a user interface is always at least
95% of the design and about 80% of the implementation :)

Rob



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Why is parsing your own form data a bad idea?

2003-11-06 Thread NYIMI Jose (BMB)
One reason to not use CGI.pm:

An important concern today in the integration architecture is to provide a means to 
support different type of clients.
Unfortunately CGI.pm will not fulfill the increasing requirements to support clients 
expecting other format than HTML.
Such clients can be palm top computers, mobile phones or other device that enables 
client access.

While there is no hindrance developping differents web components that would generate 
different presentation format, this solution is costly because it requires additional 
developement of web component for each distinct client type.
These web component also contains very similar logic - they different only in the way 
they present data - which introduces maintenance problems.

Rather than generating HTML pages on the web component tier (CGI.pm), we can generate 
XML.
HTML pages contain information on how to present the data to the web browser.
XML, on the other hand, simply describes the semantics of the data - it does not say 
anything about the preseentation.

Afterwards, such XML has to be transformed to a presentation appropriate for the 
client. This can be HTML for web browser, WML for WAP devices or any other appropriate 
format.

That's here technology like XSLT (eXtensible StyleSheet Language for Transformation) 
gets into the scene.
XSLT engine will tranform the XML to presentation format of your client.

There are several XML and XSLT modules from CPAN that can help achiving aforementioned 
requiremnts, CGI.pm will not ...

And this is not a joke :-)

My 0.02

José.


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Tore Aursand
Sent: Thursday, November 06, 2003 6:14 PM
To: [EMAIL PROTECTED]
Subject: RE: Why is parsing your own form data a bad idea?


On Thu, 06 Nov 2003 13:21:15 +0100, Jenda Krynicky wrote:
 There is absolutely _no_ reason why one shouldn't use the CGI.pm 
 module.

 There is one. If /s?he/ is using CGI::Lite instead ;-)

In that case, there are many reasons.  There are a lot of CGI::* modules out there.

My point is still valid, though;  Why do one want to use CGI::Lite instead of CGI.pm?  
Is it better?  No.  Is it safer?  No.  Is it faster?  No.  Is it more widely used?  
No.  Does it come with the Perl distribution?  No.


-- 
Tore Aursand [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Split based on length

2003-09-22 Thread NYIMI Jose (BMB)
I don't know which version of perl are you using but
I have just tried again the script i sent to you
And the ones with your modifications , both work well and do not
Die as you explained : fatal error x outside of string
Below is my perl -v output :
C:\perl -v

This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2001, Larry Wall

Binary build 631 provided by ActiveState Tool Corp. http://www.ActiveState.com
Built 17:16:22 Jan  2 2002


Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

José.

-Original Message-
From: zsdc [mailto:[EMAIL PROTECTED] 
Sent: Saturday, September 20, 2003 10:06 AM
To: NYIMI Jose (BMB)
Cc: [EMAIL PROTECTED]
Subject: Re: Split based on length


NYIMI Jose (BMB) wrote:

 I have an other request : code review :-)
 Below is my final code.
 I'm sure that you guys will find
 Some better style to write it ...

This code doesn't work with the input you sent me. It dies processing 
the third line of input (i.e. the first one which is not skipped) with 
fatal error x outside of string when get_fields calls unpack.

  sub get_fields{
my($str)[EMAIL PROTECTED];
my $format=$index_len $name_len $way_len;
$format.= $delim_len $meas_len x $nof_meas;
unpack($format,$str); # === it dies here
  }

 From perldiag manpage: 'x outside of string (F) You had a pack template 
that specified a relative position after the end of the string being 
unpacked. See pack in perlfunc.'

Unfortunately I cannot help you with the debugging right now, but I hope 
others who helped you with unpack might be more up to date with your 
code and data.

Still, as you asked about style, I made few mostly cosmetic changes to 
your code. The output is identical, it does exactly the same thing as 
your original code, even reproducing the fatal error, but might be 
somewhat cleaner to work with. I also demonstrated some magic with 
print. So here's my refactored version of your code:

#!/usr/bin/perl

use strict;
use warnings;

#--
# Global variables
#--

my $group_len =  64;
my $index_len = 'A1';
my $name_len  = 'A6';
my $way_len   = 'A3';
my $delim_len = 'x1';
my $meas_len  = 'A5';
my $nof_meas  =  9;

#-
# Subroutines
#-

sub split_len {
   my ($str, $len) = @_;
   $str =~ /.{1,$len}/g;
}

sub get_fields {
   my $str = shift || $_;
   my $format = $index_len $name_len $way_len;
   $format .=  $delim_len $meas_len x $nof_meas;
   unpack $format, $str; # - DIES HERE: x outside of string
}

#--
# Main
#--

($,, $\) = (\t, \n);

while () {
 next if $.  3;
 /(\d{2}-\d{2}-\d{4}:\d{3})\s+(\d{2})(.+)/ or die Bad input\n;
 my ($date, $dummy, $str) = ($1, $2, $3);
 for (split_len $str, $group_len) {
print $date, get_fields;
 }
}

__END__

I'm sure it's going to get much cleaner in a while, when other people 
change few other things. Ask if you're not sure how the print works here 
but you might first read about $, and $\ (the output field separator 
and the output record separator) in perldoc perlvar.

Note that this code still dies on unpack, just like yours, so you still 
have to debug it anyway. Speaking about the unpack, I wouldn't use it 
here. For simple things it's great but with your data the format gets 
quite complicated. Take a look at these CPAN modules:

Parse::FixedLength
Data::FixedFormat
Text::FixedLength
Text::FixedLength::Extra
AnyData
AnyData::Format::Fixed
DBD::AnyData

I'm not sure which one would be best for you, but they all help handle 
fixed-length records data, exactly what you are doing manually.

For example DBD::AnyData (which would probably be an overkill here, but 
is definitely worth knowing about) is a driver for DBI. You can use the 
data like it was a table in an SQL database. It uses SQL::Statement as 
SQL parsing and processing engine.

The AnyData module helps you manipulate data in many formats (fixed 
length, tab delimited, pipe delimited, passwd style, CSV, XML, HTML 
tables, vertical/paragraph text files, etc.). You can use the data like 
it was a %hash or manipulate it with SQL queries with DBI and 
DBD::AnyData. AnyData also makes converting between formats very easy.

Parse::FixedLength is very powerful. You define a parser object, which 
then can parse data. You can subclass Parse::FixedLength and make using 
it in your main program very easy by just calling new method on your 
parser class and feeding the new object with data.

Data::FixedFormat is easier to use and its count keyword would be 
probably ideal for your needs here to use instead of get_fields 
subroutine, when you

RE: Split based on length

2003-09-19 Thread NYIMI Jose (BMB)
IMHO
$string =~ /.{1,$len}/g;
Is the best suggestion i have seen so far ;)

I have an other request : code review :-)
Below is my final code.
I'm sure that you guys will find
Some better style to write it ...

#!/usr/local/bin/perl -w
use strict;
#--
#Global variables
#--
my $group_len=64;
my $index_len='A1';
my $name_len='A6';
my $way_len='A3';
my $delim_len='x1';
my $meas_len='A5';
my $nof_meas=9;
#--
#Main
#--
my $file=$ARGV[0];
open(FH,$file) || die can not open $file : $! \n;

while(my $line=FH){
next if $.  3;
 
my($date,$dummy,$str)=$line=~/(\d{2}-\d{2}-\d{4}:\d{3})\s+(\d{2})(.+)/;
  for( split_len($str,$group_len) ){
 print $date.\t, join( \t,get_fields($_) ),\n;
  }
}
close(FH);
#
#Subroutines
#
sub split_len{
  my ($str, $len) = @_;
  $str =~ /.{1,$len}/g;
}

sub get_fields{
  my($str)[EMAIL PROTECTED];
  my $format=$index_len $name_len $way_len;
  $format.= $delim_len $meas_len x $nof_meas;
  unpack($format,$str);
}



-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2003 12:17 AM
To: Bob Showalter
Cc: Stephen Hardisty; [EMAIL PROTECTED]
Subject: RE: Split based on length


On Sep 18, Bob Showalter said:

Stephen Hardisty wrote:
  for(split(/(..)/, $string)) { print *$_ if $_; }

 Gorgeous :o)

@parts = grep length, split /(..)/, $string;

WHY are we using split() for this?  Why are we using a method that
returns a list twice the size that we want, that we then have to filter
through?

  @parts = $string =~ /.{1,$len}/sg;

and you're done.

-- 
Jeff japhy Pinyan  [EMAIL PROTECTED]
http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/
http://www.cpan.org/
stu what does y/// stand for?  tenderpuss why, yansliterate of
course. [  I'm looking for programming work.  If you like my work, let
me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   3   >