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
" <[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
>
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:
>
>#!
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é.
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
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 "&
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}
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
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";
}
.
#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
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(
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
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(
Hello All,
Could you explain this syntax please ?
$x ||= $y || '';
Thanks,
José.
-
Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
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
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
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
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
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
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 !
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
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
22 matches
Mail list logo