Excellent thanks, works fine.
Is there any way to replace / by a \ (useful for windows paths).
Because this syntax doesn't works:
$emaillink_new =~ s///\/g;
Thanks for your help
Hello,
I have a simple question.
I run a perl script on a windows server which use blat to send an email with an attachement. But blat doesn't support to have a blank in the filename.
My fiename is here:
my $emaillink="./mail/$start_time.$_[0].msg";
The variable is for example equal to ...
Hello,
I have a perl script that connect to a mysql database.
Sometimes a query does not return any row. In the case if there is no rows, how can I print a message like "no row prensent" ?
(how can I insert a if condition that check the rows returned in the while loop ?)
Thanks...
Hello,
I have a problem with Add_Delta_Days function of the Date::Calc module.
The problem id the month returned doesn't have a 0 before the mon the number if it under 10:
my $dateinputscript = 16032006
my $date = $dateinputscript;
my $day = $date ;
$day =~ s/(\d\d)(\d\d)\d\d(\d\d)/$1/;
my...
I'm not sure that the problem comes from the first 0.
For example if I set the same date for the two variables like this:
$datend = 15032006;
$datend =~ s/(\d\d)(\d\d)\d\d(\d\d)/$3$2$1/; --> OK 060315
$datestart = 15032006;
$datestart =~ s/(\d\d)(\d\d)\d\d(\d\d)/$3$2$1/; --> WRONG, return...
Sorry again but if I set a second variable using the same regualr expression, the value is not correct:
$datend = 15032006;
$datend =~ s/(\d\d)(\d\d)\d\d(\d\d)/$3$2$1/; --> OK 060315
$datestart = 01012006;
$datestart =~ s/(\d\d)(\d\d)\d\d(\d\d)/$3$2$1/; --> WRONG, return always the same value...
Hello,
I have a script that receive a date in parameter like these 02032006 (ddmmyyyy).
my dateparmam = $_[0]
How to convert this date in 060302 (yymmdd) ?
Thanks
Hello,
I found on the forum a lot of question about the find command to exclude some folders... but I could not resolve my problem:
I start a script from /
This script should delete all files older than XX in a particular folder recursively. There only one folder and all it subfolder which...
Hello,
I'm currently writing my first script in ksh and I'm trying to use awk to manipulate some lines.
I'm writing this script to extract Logical Volume informations on a AIX server to generate the creation script.
All the steps are Ok without one.
What I do :
lsvg $vggroup | grep -iE...
Thanks for this answer, but I take a look of this tool and I don't find any way to log every SQL update, insert and delete statement.
With the wizard you can choose the user but you have to find after on point 5, which kind of SQL statement you like to report.
Thanks for your help
Hello,
I'm just going to DB2 and I'm looking for a similar tool like MS SQL Profiler.
I would like on some databases in the same instance, trace every update,delete statement from the user X. Loging the trace in a table or a file ...
It's quite esy on MS SQL and on Oracle, but I don't find...
In a french forum, somebody give me this code and it works fine. Creating the variable with my and by doesn't fetching the row in a loop ... works fine.
Thank everybody for your help
my $countrowstodelete = $dbh->prepare ("SELECT count(*) FROM $_[0] WHERE TO_DAYS(NOW()) -...
stevexff:
Some tables have more than 10'000'000 rows, for that I dont' want ro run a delete on the table if it's not necessary. I must run a count to know the number of lines present before --> if not equal a 0 (different than 0) --> run the delete --> and after the script execution, count the...
Hello,
I use the DBI module to connect to a mysql database.
First I run a count on a table and I like, if the result of these is query is not 0, to run a delete on this table.
I do this, but I have an error:
Use of uninitialized value in numeric ne (!=) at mysql_epur_function.pl line 116
...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.