3XLcom
asked on
perl send variable
i have a code as given below which works on every minute .
for this line :
my $datadir = '/var/flows/router1/2013/2013-12/2013-12-18';
bold part is date. and i want to generate this address in the script how should i do it ?
for this line :
my $datadir = '/var/flows/router1/2013/2013-12/2013-12-18';
bold part is date. and i want to generate this address in the script how should i do it ?
#!/usr/bin/perl
use strict;
use DBI;
# TODO: Change to fit your environment
my $datadir = '/var/flows/router1/2013/2013-12/2013-12-18';
my $sqlhost = 'localhost';
my $sqluser = 'root';
my $sqlpass = 'gbc1282';
my $sqldbname = 'ip';
my $sqltable = 'mytable';
my $coldatetime = 'timestampfromfile';
ASKER
i think you mis understood me
my $datadir = '/var/flows/router1/'. '2013/2013-12/2013-12-18';
bold part will written by perl
my $datadir = '/var/flows/router1/'. '2013/2013-12/2013-12-18';
bold part will written by perl
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
that is it thanks
please check out my other questions
please check out my other questions
print +(split'(/)',$datadir)[-5.