[EMAIL PROTECTED] wrote:
> This is a code snippet from my program the prints a fixed set of column headings and
> seperators for an array retrieved from a database. The final output for this example
> should be:
>
> USER SID,SERIAL LOGON TIME MODULE ACTION
>
This is a code snippet from my program the prints a fixed set of column headings and
seperators for an array retrieved from a database. The final output for this example
should be:
USER SID,SERIAL LOGON TIME MODULE ACTION
~~ ~~ ~
> I am having a lot of trouble writing a script to search
> through the contents of a list of zipped files. I have
> numerous files which are zipped using gzip, and I do not have
> the permissions to unzip them. I can, however, "less" the
> file and view its contents
That makes no sense. If
Hello Fellow Experts:
I am having a lot of trouble writing a script to search through the contents
of a list of zipped files. I have numerous files which are zipped using
gzip, and I do not have the permissions to unzip them. I can, however,
"less" the file and view its contents as such:
sprintf did the trick! Thanks to all who responded.
>>> "Craig Sharp" <[EMAIL PROTECTED]> 07/23/04 10:57AM >>>
I need to get 2 digit time and date in a scalar when there is only 1 digit.
Eg: Using printf with %02d, I am able to get 05 to print at 5 min past the hour.
printf("%02d",$Minute)
I
Hi Craig,
I'm not sure if this is what your trying
to do but this has worked for me.
my ($mday, $mon, $year) = (localtime)[3..5];
#++$mon; #for those people that don't
count months starting with 0
$year = sprintf("%02d", $year
% 100);
my %calnames = ( 0 =>'Jan'
, 1=>'Feb',
Try sprintf
Just add an 's' in front of your printf and you should
be square.
--- Craig Sharp <[EMAIL PROTECTED]> wrote:
> I need to get 2 digit time and date in a scalar
> when there is only 1 digit.
>
> Eg: Using printf with %02d, I am able to get 05 to
> print at 5 min past the hour.
>
>
I need to get 2 digit time and date in a scalar when there is only 1 digit.
Eg: Using printf with %02d, I am able to get 05 to print at 5 min past the hour.
printf("%02d",$Minute)
I need to assign this output to a scalar variable so that I can use it as part of a
filename later in the code.