Re: Simple question

2002-05-24 Thread José Nyimi
perldoc -f system or perldoc -f exec or use of backtick stuff $script_result=`//bin/perl script.pl arg1 arg2 `; HTH, José. "Leon, Yanet I,,DMDCWEST" <[EMAIL PROTECTED]> a écrit : How do I invoke a perl program from within another perl program? I don't need to use a module or create one fo

Re: My name is ?

2002-05-23 Thread José Nyimi
" <[EMAIL PROTECTED]> a écrit : "Subject: My name is ?" That's easy, your name is José Nyimi ;-) > How can I tell my script to get the complete > name of the file where this script is written? > > I can write something like: > > #!/usr/bin/perl -w >

Re: My name is ?

2002-05-23 Thread José Nyimi
Nice, It works ;-) José. Peter Scott <[EMAIL PROTECTED]> a écrit : At 11:09 PM 5/23/02 +0200, José Nyimi wrote: >Hello, > >How can I tell my script to get the complete name of the file where this >script is written ? > >I can write something like: > >#!

My name is ?

2002-05-23 Thread José Nyimi
Hello, How can I tell my script to get the complete name of the file where this script is written ? I can write something like: #!/usr/bin/perl -w use strict; print "My name is ",__FILE__,"\n"; __END__ But the basename is missing, how can I print the complete name ? Thx, José.

Re: passing through the @ENV on top of Re: Check if a directory is writable

2002-05-22 Thread José Nyimi
No particular resaon to use $ENV{MY_DIR}. It's not like that in my real code :-). Sorry ... José. drieux <[EMAIL PROTECTED]> a écrit : On Wednesday, May 22, 2002, at 01:41 , José Nyimi wrote: [..] > Which will look like: > > #!/usr/bin/perl > use strict; > use

Re: Check if a directory is writable

2002-05-22 Thread José Nyimi
files only ??? Thx, José. "John W. Krahn" <[EMAIL PROTECTED]> a écrit : José nyimi wrote: > > Hello, Hello, > I would like to check if a given directory is writable for the user who run the >script. > > My first idea is to open a dummy file in "&

Check if a directory is writable

2002-05-22 Thread José Nyimi
Hello, I would like to check if a given directory is writable for the user who run the script. My first idea is to open a dummy file in ">" mode on that directory and check if everythink went ok or not. Which will look like: #!/usr/bin/perl use strict; use warnings; my $mydir=$ENV{MY_DIR}

Re: Perl Server Pages (PSP)

2002-05-20 Thread José Nyimi
http://www.google.be/search?q=psp+perl+server+page&hl=fr&ie=UTF8&oe=UTF8 José. Michael Norris <[EMAIL PROTECTED]> a écrit : Hello, I've recently come across web pages with the .psp extensions rather than the usual /cig-bin/. I have found that .psp stands for Perl Server Pages, but I have n

Re: Open a file to a Hash

2002-05-20 Thread José Nyimi
perldoc -f tie Or Why not use hash of array structure: open(FH,$filename) || die "error message\n"; @file_content=; close(FH); $hash{FILE}=\@file_content; ### After you can use your hash like this : $myfile_arrayref=$hash{FILE}; foreach $line ( @{$myfile_arrayref} ){ #bla bla #print "$line\n"; }

Re: print $LOG "This is a test";

2002-05-20 Thread José Nyimi
. #Is this a correct Design ? } #Of course there is code below: constructor and bla bla ... 1; ### José. Peter Scott <[EMAIL PROTECTED]> a écrit : At 02:29 AM 5/20/02 +0200, José Nyimi wrote: >Hello, > >For some reasons, I would to write a sub that return an handle

print $LOG "This is a test";

2002-05-19 Thread José Nyimi
Hello, For some reasons, I would to write a sub that return an handle of a given file : $LOG=get_file_handle($file_name); So afterward I could say print $LOG "bla bla"; My first try --- #!/usr/bin/perl use warnings; use strict; my $file_name='test.log'; my $FH=&get_file_handle(

Re: perl DBI disconnect question

2002-05-16 Thread José Nyimi
I'm not a DBI guru but I guess if you "try and catch" your DBI exception handling with eval, you can exit properly at all. I mean: eval{ $dbh=DBI->connect($connect_string); $sth=$dbh->prepare($sql); $sth->execute(); #some fetch here $sth->finish(); $dbh->disconnect(); } if($@) { print "program

TIMTOWTDI

2002-05-12 Thread José Nyimi
Hello All, The Perl slogan is: "There Is More Than One Way To Do It". I'm interested to see how you will do the small convertion below. Here is one of mine: probably not the best one :-). #!/usr/bin/perl use strict; use warnings; my $out=&convert('abCdE'); print "$out\n"; sub convert { my(

Help on syntax

2002-05-12 Thread José Nyimi
Hello All, Could you explain this syntax please ? $x ||= $y || ''; Thanks, José. - Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !

RE: ODBC - win2k

2002-04-22 Thread José Nyimi
If you wouldn't use control panel, you can use the complete path to your access db, like this: dbi:ODBC:driver=Microsoft Access Driver (*.mdb);dbq=\\serveur\shared\your_db_access_name.mdb José. "Hooten, Michael" <[EMAIL PROTECTED]> a écrit : Make sure you add an entry for the database to Co

RE: ODBC - win2k

2002-04-22 Thread José Nyimi
DBI::ODBC is also really very easy to use. Mike, as suggested write down how you are making your connection then it will come more clear to help. José. Mike Rapuano <[EMAIL PROTECTED]> a écrit : I would recommend Win32::ODBC from http://www.roth.net Its really easy to use Mike -Orig

Re: remove duplicate values from array

2002-04-22 Thread José Nyimi
Ok, thanks ! I read it and every thing becomes clear to me :-) José. Jenda Krynicky <[EMAIL PROTECTED]> a écrit : From: José Nyimi > this slice thing is really very nice. > > @hash{@array1}=@array2; > > I saw it many times used in constructor of "Object Oriented&quo

Re: remove duplicate values from array

2002-04-22 Thread José Nyimi
Hé ! Jenda this slice thing is really very nice. @hash{@array1}=@array2; I saw it many times used in constructor of "Object Oriented" Perl's code. Could you explain sequencely the syntax please ? José. - Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en f

RE: Passing a variable to a DOS batch file

2002-04-22 Thread José Nyimi
Hm ... Do you have some link(s) to cmd.exe shell documentations ? (even advanced !) José. [EMAIL PROTECTED] a écrit : On 21 April 2002 01:07, Paul Lombardo [mailto:[EMAIL PROTECTED]] wrote: > > I am new to this group and coming back to perl after a year > long hiatus. > > I am using perl o

Re: Time being displayed is off my 7 hours

2002-04-21 Thread José Nyimi
Which perl's function (or module) are you using to print out time information ? Could you write down the syntax you are using ? José. - Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !

Re: browsing html pages

2002-04-20 Thread José Nyimi
I've found this book very interesting: Professional Perl Development (ISBN 1861004389). for further details: http://www.wrox.com/ACON11.asp?WROXEMPTOKEN=20916ZYzWjJPaaDVmYLr4lbAT5&BOOKID=434&ISBN=1861004389 José. José Nyimi <[EMAIL PROTECTED]> a écrit : These modul

browsing html pages

2002-04-20 Thread José Nyimi
These modules can help : LWP::UserAgent and HTML::Parse Here some docs from http://search.cpan.org/ http://search.cpan.org/doc/GAAS/libwww-perl-5.64/lib/LWP/UserAgent.pm and http://search.cpan.org/doc/GAAS/HTML-Parser-3.26/Parser.pm José. - Yahoo! Mail