On 9/3/07, Shams Fantar <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to give a date (the year, the day, the hour and the minute) to a
> file. So, I use localtime function. But I don't understand how to use
> localtime (after reading the documentation on this function). Can you
> help me with this function?
>
> Next, I want to use a shell command, so I use the Shell function[2], and
> I must use the 'mysqldump' command :
>
> mysqldump -u root -p *** --all-databases > $FILE

The Shell module may be used to make this system call to the utility
'mysqldump' transparent to the code. Like this:

  use Shell qw( mysqldump );
  my $content = mysqldump( qw( -u root -p *** --all-databases ) );

The mysqldump() function gets all the output produced by the utility
'mysqldump'. But there's very much to be gained by using Shell. And
unless your script is very small, it's not such a good idea to use it
(the Shell core module).

>
> How could I use this command with the Shell function ?
>
> [1] : http://perldoc.perl.org/functions/localtime.html
> [2] : http://perldoc.perl.org/Shell.html
>
> I'm a beginner with perl... :-)
>
> Thanks !

Welcome to Perl.

Best regards,
Adriano Ferreira

> --
> Shams Fantar (http://snurf.info)
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> http://learn.perl.org/
>
>
>

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


Reply via email to