##
##
###
### FUNCTION NAME
### --
### DateMinusX()
###
### PURPOSE:
###
### Return a date that is X number of days ago
###
### RETURN VALUE:Comment:
###
One way would be to split each line using : as the delimiter..
I am sure there are others, but I think split would be the easiest... IMHO
From: sudhindra k s
Sent: Wed 8/4/2004 5:48 AM
To: [EMAIL PROTECTED]
Subject: Choosing only numbers from the output
Hi
I have an output which looks li
for starters $t is local to func1 via the usage of my
my ($forecast, $t);
secondly you could either declare $t as a global var or pass it to func2
-Ron
From: Marco Perl
Sent: Fri 7/23/2004 10:05 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Team! Help a newbie with $t->print("ls"); whi
Hello all!
I have a rather simple question that has me stumped (for about 2 hours now)
I am using the MIME:Lite package
(http://theoryx5.uwinnipeg.ca/CPAN/data/MIME-Lite/MIME/Lite.html) to
Send reports via email from a *nix box.
What I am looking to-do is send the text of a report in the body of
Hello all!
I am stumbling around with Net::Ftp and trying to figure a clean way to
detect errors and report accordingly.
Currently I have the following butt ugly type of crud surrounding numerous
ftp function calls
&error("Unable to login to mc0300ux218" . " (FILE: " . __FILE__ ."
LINE:
doesn't this limit to what is used with respect to POSIX?
use POSIX qw(strftime);
then you could use strftime and eliminate
my @dmy = (localtime)[3..5];
$dmy[1] ++;
$dmy[2] += 1900;
my $dmy = sprintf "%02d%02d%04d", @dmy;
-Ron
-Original Message-
From: Rob Dixon
To: [EMAIL PRO
use Time::Local;
use POSIX;
$TODAY = strftime("%d%m%Y", localtime());
print $TODAY;
13062003
-Original Message-
From: Praful Bajaria [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 12:02
To: [EMAIL PROTECTED]
Subject: How to get ddmm format.
All,
How would
The
Or die ""; is force of habit, hard to teach and old dog new tricks :) I
just found out about Fatal this past week and started to use it...
-Ron
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 11:56
To: 'Yacketta,
Got a fix :)
Keep the use Fatal qw/open close/; and then in the block of code add
$CNTFILE to the my() and change all CNTFILE's to $CNTFILE
-Ron
-Original Message-
From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 11:43
To: [EMAIL PROTECTED]
Subjec
, 2003 10:45
To: 'Yacketta, Ronald'; [EMAIL PROTECTED]
Subject: RE: Perl -w odd error
Yacketta, Ronald wrote:
> Rob,
>
> Line 151 _IS_ @FILE=; and here is the entire block of code
>
> sub OTTExecute()
> {
> system($ExecCmd);
> $success = $? >> 8
Rob,
Line 151 _IS_ @FILE=; and here is the entire block of code
sub OTTExecute()
{
system($ExecCmd);
$success = $? >> 8;
printNotice ("$success\n");
if ( ! $success )
{
my ($record_count, @FILE);
open (CNTFILE, "${OUTPUTFIL
That goes against everything perl ;) why not _slurp_ the entire file in
(which is 100% perl legal) (@FILE=;)
-Ron
-Original Message-
From: Miller, Joseph S [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 17:25
To: Yacketta, Ronald; [EMAIL PROTECTED]
Subject: RE: Perl -w odd
Folks,
I have the following block of code:
open (CNTFILE, "${OUTPUTFILE}") or die "Can't open ${OUTPUTFILE} :
$!";
@FILE=;
close(CNTFILE);
Which reports this warning:
Name "main::CNTFILE" used only once: possible typo at ./OrderTakingTree.pl
line 151.
I am just opening
Folks,
I have hit a minor brain road block here, trying to regex out a line
containing all text up to the first .
Line looks like this:
<04/01/03 16:36:21.737 [blah]>|blah(): Throw blah from idl method: Number:
6048 Reason: blah failed: blah. blah. - OrderNumber blah
WorksheetNumber SR Worksh
Hello Jenda,
JK> Why don't you open the file directly?
JK> open ($LOG,"$g_logdir/OrderServer-*.log")
JK> or die ( "Unable to open $g_logdir/OrderServer-*.log : $!");
JK> or am I misunderstanding something?
I will give that a whirl in the AM, could have sworn I tried tha
Hello Mik,
MR> Hi
MR> There are people on this list who
MR> kindly share their knowledge
MR> with others, like myself, to help
MR> us better understanding perl fundamentals.
MR> But there are also people who misuse that
MR> kindness to gain, I think, commercial advantage.
MR> Regards
MR> Mik
Hello All,
I am sure someone out their in Perl land can offer a better solution
to the following.
###
### slurp in all the required data for the report
###
open ($LOG,"cat $g_logdir/OrderServer-*.log|")
or die ( "Unable to open $g_logdir/OrderSe
Can some please help here :)
I have the following
sub dbMonthlySelect() {
my $query;
my $result;
$query = "select * from mbstats_se where
STATDATE=TO_DATE('12/30/02','MM/DD/YY')";
$result = &doQuery($query,'dbMonthlySelect');
my $i = $result->fetchrow_h
Folks,
Can some one kindly slap me silly and show me where I went south?
sub dbMonthlySelect() {
my $query;
my $result;
$query = "select * from mbstats_se where
STATDATE=TO_DATE('12/30/02','MM/DD/YY')";
$result = &doQuery($query,'
Yes,
You can dl and install a Solaris compatible version of gcc and use it to
install perl
I do not have the url handy, but their is a sun page for third party (GNU
type) software.
-Ron
-Original Message-
From: Tony Yi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 04, 2002 15:30
T
Gah!
bassackwards again :(
-Original Message-
From: LRMK [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 12:11
To: Yacketta, Ronald
Cc: [EMAIL PROTECTED]
Subject: Re: Difference between $count++ and ++$count
++$count will increment $count before it is used
$count++ will
Yes
If I recall correctly:
++$count will increment $count after it is used
$count++ will increment $count before it is used
-Ron
-Original Message-
From: Mystik Gotan [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 11:54
To: [EMAIL PROTECTED]
Subject: Difference between $coun
O.K folks, got it 90% done, just unsure of the time difference piece
what is out their that one could use to get the difference in time using the
following format
start: 20:08:13.765 end: 20:08:13.871 elapsed time:
Regards,
Ron
-Original Message-
From: Yacketta, Ronald
Sent
upon, this information by persons or entities other
than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the
material from any computer.
--
-Original Message-
From: nkuipers [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 2
All,
I need to parse the following info and generate the total elapsed
time for each function call per thread.
<09/25/02 20:03:31.974 [21168]>|thread: 6: start getContract
<09/25/02 20:03:32.296 [21168]>|thread: 6: end successful getContract
<09/25/02 20:07:52.778 [21168]>|thread: 7: sta
All,
Have a quick regex question here ;)
What is the sequence to search for a string backwards?
IE:
03:17amup 36 days, 49 mins, load average: 1.90, 1.83, 1.75
Instead of splitting/searching what have you to get the middle
number (1.83)
I th
Folks,
I have come to a road block of sorts, I am currently working on a
web front-end to a Oracle 8i DB. We are looking to allow users to enter
their own quires generated via check boxes for tables and a simple step by
step process to aid in the sql creation.
I was wondering, wh
}
}
}
sort the array
foreach $line (sort sortby @cheaters)
-Ron
> -Original Message-
> From: Frank [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 12:43
> To: Yacketta, Ronald
> Subject: Re: sorting an array
>
>
> On Mon, Feb
Folks,
I have an array which contains data as such
psych|Sun Feb 17 2002|0:35:59|1523882|HLHack|UG-CS Central-Hell's Kitchen
uenlon|Sun Feb 17 2002|3:31:17|127244|HLHack|UG-CS Central-Hell's Kitchen
uenlon|Sun Feb 17 2002|3:31:19|127244|HLHack|UG-CS Central-Hell's Kitchen
juihung|Sun Feb 17
maybe you need to flush your output? if I am correct nothing is printing
because it is not flushing
add this to the top of the script
$|=1;
again, not sure if this is the right solution etc..
> -Original Message-
> From: Bruce Ambraal [mailto:[EMAIL PROTECTED]]
> Sent: Monday, Februar
Folks,
I have this little sort routine
##
## UGLY HACK to sort the dates correctly
##
($name, $date, $time, $wonid, $cheat, $server) = split(/\|/, $a);
($wday,$month,$mday,$year) = split(/\s+/, $date);
($hour,$min,$secs) = split(/:/, $time);
$TIME = timelocal($secs,$min,$hour,$mday,$
its that simple? WoW! I must have fubarbed somewhere, I have those books as
well as several others and hell I am not even close to be a pro!/me dreams
about the day I can be a perl gawd like Randel (spelling)
-Ron
> -Original Message-
> From: Matthew Peter Lyon [mailto:[EMAIL PROTECTED]]
what errors messages are seen in the web server logs?
IE: (linux/appache)
what is in /var/logs/httpd/error_log ??? (name might be off, dont have a
linux box ate my disposal atm)
-Ron
> -Original Message-
> From: Hughes, Andrew [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 14, 200
Folks,
I have the following log line
[GUARD] ux234<870><1764517><13.231.232.72> IMP
here is the regex I am attempting to use
# $1 $2$3 $4$5
$6
elsif ( $line =~ /\[GUARD\] (.+)<(\d+)><(\d+)><(.+)> (.+) <(.+)>/)
Folks,
looks like the exchange server her is not liking the topic :( maybe a new
one will get replies posted to
me..
is thier a utilit that can parse a web server and generate a listing (with
links) of
the web sites located on the server. I am not looking to worm other boxes
etc..
just need a u
Folks,
is it possible? is it do-able?
can one generate a HTML listing of all web spaces
on a IIS server? to include virtual webs, virtual dirs
etc.. via perl?
Regards,
Ronald J. Yacketta
Principal Consultant
Ciber, INC
345 Woodcliff Dr.
Fairport, NY 14450
---
I have a small issue with this... it does not work 100% of the time.. I
added a print to the follwoing
sub doSID () {
###
###
### Parse the @scrfiles array, replaceing _SID_
### with the user supplied SID
###
###
local @ARGV = @scr
That's the ticket! thanxs.. not up to par on regex yet.. I had to modify a
module I got from cpan
to remove the comments.. the darn thing just check for spaces and comments
at beginning of line :(
-Ron
> -Original Message-
> From: Frank [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January
Folks,
I am reading in a .cfg file and exclude comments (#) and spaces at the
beginning of the line
how would I lop off any comments in a line?
IE:
Key "value" # comment here
Regards,
Ron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Yes,
check out DBD, DBI on cspan :)
> -Original Message-
> From: yun yun [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 14, 2002 10:00
> To: [EMAIL PROTECTED]
> Subject: can perl connect to database?
>
>
> I mean db such as Access,SQL,etc. not its own dbm filters
>
> _
No takers on my minor request for help from the guru's?
-Ron
> -Original Message-
> From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 11, 2002 09:14
> To: Beginners (E-mail)
> Subject: Code clean up help PLEASE
>
>
> Folks,
Folks,
I have received a ton of useful info from the list.. a great deal of it of
late has gone to help me with my current project to automate (somewhat) a
testing procedure.
I have finally made my way to the final stage of the script.. execution of
the test.. I have the following (be for warned
I asked this in another thread, no response maybe I can muster up one from
this thread ;)
I was informed of the following:
local ($^I, @ARGV) = (".bak", @sleepystart);
while (<>) {
$_ = "$db_name\n" if $. == 1;
print;
close ARGV if eof;
}
which will nab line one and
would this be correct? I have a feeling no..
$_ = "$db_name\n" if ($. == 1 && $_ !~ /$db_name/);
> -Original Message-
> From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 09, 2002 12:21
> To: Yacketta, Ronald
>
ay, January 09, 2002 11:50
> To: [EMAIL PROTECTED]
> Cc: Yacketta, Ronald
> Subject: Re: Inline file edit
>
>
> "Yacketta, Ronald" <[EMAIL PROTECTED]> writes:
>
> > Would I be able to use this inline? That is within a perl
> > script itself? If so, migh
Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 09, 2002 12:07
> To: Yacketta, Ronald
> Cc: Beginners (E-mail)
> Subject: RE: array of filenames to open
>
>
> On Jan 9, Yacketta, Ronald said:
>
> >is their another trick to forgo the
print;
}
}
Regards,
Ron
> -Original Message-
> From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 09, 2002 11:50
> To: Yacketta, Ronald
> Cc: Beginners (E-mail)
> Su
actualy it should be an array of variables that contain filenames
@files = ( \$file1, \$file2, $file3 );
is that correct?
> -Original Message-
> From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 09, 2002 11:44
> To: Beginners (E-mail)
> Su
Folks,
looking for a simple example of putting a set of filenames into an array
and then opening each of them for parsing.
I was think of
@files = ( "file1", "file2", "file3" );
foreach $file (@files) {
open FN, "< $file";
do something here
close
}
am I correct? or
Would I be able to use this inline? That is within a perl script itself?
If so, might you provide an example?
Regards,
Ron
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Michael R. Wolf
Sent: Tuesday, January 08, 2002 11:43 PM
To: [EMAIL PROTECTED]
Su
27;$db_name'/g' ../input/tmp.scr > $g_logpass");
> -Original Message-
> From: Yacketta, Ronald
> Sent: Tuesday, January 08, 2002 11:11
> To: Yacketta, Ronald; '[EMAIL PROTECTED]'; Yacketta, Ronald
> Cc: 'Beginners (E-mail)'
>
arse and change per run based on user input.
> -Original Message-
> From: Yacketta, Ronald
> Sent: Tuesday, January 08, 2002 11:06
> To: [EMAIL PROTECTED]; Yacketta, Ronald
> Cc: Beginners (E-mail)
> Subject: RE: pull line #1 from a file
>
>
> so so close...
> I
ECTED]]
> Sent: Tuesday, January 08, 2002 10:56
> To: Yacketta, Ronald
> Cc: Beginners (E-mail)
> Subject: Re: pull line #1 from a file
>
>
> On Tue, Jan 08, 2002 at 10:50:51AM -0500, Yacketta, Ronald wrote:
> :
> :Folks,
> :
> :need some minor help here.. been looki
Folks,
need some minor help here.. been looking in the Cookbook for an example
to pull the first line from a file..
Regards,
Ron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Better yet..
to ease the search and aid in proper development of a future perl user
http://www.oreilly.com/catalog/lperl3/
more Perl books can be found here
http://perl.oreilly.com/
Regards,
Ron
> -Original Message-
> From: Bob Showalter [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, Jan
Folks,
looking for a clean way to change a value in a file on the fly before it is
processed (ran).
I have a perl script that kicks off several resource scripts (.scr) that are
NOT a valid shell script and can not be ran from the command line alone. I
need a way to modify these .scr scripts on th
sounds like yah need to install the Manip pacakge
> -Original Message-
> From: Alex Harris [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 07, 2002 12:26
> To: [EMAIL PROTECTED]
> Subject: date compare problems
>
>
>
>
>
> Ok so I'm REALLY REALLY a newbie and this next question i
how about converting the times to epoch time and then compare?
have a look at timelocal to convert to epoch time
> -Original Message-
> From: Alex Harris [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 07, 2002 11:38
> To: [EMAIL PROTECTED]
> Subject: comparing dates
>
>
>
>
>
Have you tried rcp?
-Original Message-
From: Dermot Paikkos [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 04, 2002 9:34 AM
To: [EMAIL PROTECTED]
Subject: UUCP and perl (or any alternatives)
Hi Gurus,
I need to create a script to copy files from one server to another.
Both servers a
Folks,
I have a date string as such
Thu Dec 10 2001
Tue Dec 8 2001
Wed Dec 7 2001
I have two hashes created for day_of_week and month_of_year
To get the numeric value for the month and week day #.
The problem I am having is getting the split right.
I have
My ($wday,$month,$mday,$year) = spli
($hash{$variable_name}
) use $variable_name
-Ron
> -Original Message-
> From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 07, 2001 19:23
> To: [EMAIL PROTECTED]
> Subject: RE: RE: Passing variables
>
>
> > > Ron, I think you meant
But the values HAVE to be read in.. Each run is different and could have
different values..
I could set a default set of values, but still need to read in a .cfg to
get the actual
Values. Tis why I went down this ugly road
Any insight as to how to make it work as I would like? Being able to
r
Folks,
I am using the ConfigReader.pm and have the following setup...
yes, I am using -w and strict ;)
my
($g_all_cl,$g_p5_cl,$g_p299_cl,$g_imp143_cl,$g_imp5_cl,$g_imp_14_cl,$g_val_c
l,
$g_all_cl_think,$g_p5_cl_think,$g_p299_cl_think,$g_imp143_cl_think,$g_imp5_c
l_think,
$g_imp_14_cl_think,$g_v
you're
> heading into administrative territory and
> > that's not my strong suit. Someone else on the list is
> probably better prepared to answer this.
> >
> > Cheers,
> > Curtis
> >
> > --- "Yacketta, Ronald" <[EMAIL PROTECTED]&
Folks,
I have just completed a front-end enduser script that will take numerous
input values that
need to be passed onto other perl scripts depending on the user input.
Is there a clean way (other than command line) to pass on the variables from
one
script to another (the other scripts are calle
Folks,
I have been converting several shell scripts to perl, one of my recent tasks
has
been to convert several egreps into an efficient perl subroutine.
each egrep (5 total) is kicked off to parse a single log dir of ~350 log
files
that grow in size as a process runs. The total size of a log fi
Folks,
Looking for a little help for taking current time (from time) and finding
the time until 1 minute after midnight.
I have a daemon process (perl script) that needs to die ever new day,
the process should only run from 12:01 AM Today - l 12:01 AM Tomorrow
any thoughts?
-Ron
--
To unsu
Folks,
anyone know of a nifty util/script (perl) to parse SAR data?
-Ron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Folks,
What would be the most efficient,easiest way to nohup a script from within
perl?
$file_to_run = "nohup $filename &";
exec ($filename); ?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
True..
but tis hard to view that page when the company has it filtered out via its
proxy... why? only the twits who run the proxy know
> -Original Message-
> From: _brian_d_foy [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 24, 2001 12:12
> To: [EMAIL PROTECTED]
> Subject: Re: g
Folks,
I have the following little test code
my $output = <
EOF
;
print $output;
$num_clients = ;
how would I get the cursor to be on the same line as the => after the print
happens?
right now it looks like:
Select the number of clients to run for this SLT:
1) 2000
2)
Folks,
need a little assistance here, I finally have stumbled upon the need to make
an interactive perl
script. One that takes answers from stdin etc... I have written a few perl
scripts that are not interactive, but never interactive.
Could someone point me to some examples? please, dont send t
Folks,
(forgive the HTML email, my outlook is kinda whacking on me ATM)
I have the following benchmark line in my perl code
my $etime = timeit(1, \&get_errors);
more code
printf OFN "egrep\t: %s\n", timestr($etime);
is there a way to manipulate the timestr output? The function it calls has
one way I have done this in the past is
open(COM, "parse.pl |") || die("fork failed: \l$!\n");
while ( ) {
blah
}
close COM
> -Original Message-
> From: Sofia [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 13:21
> To: [EMAIL PROTECTED]
> Subject: Gathering outpu
stab in the dark (again) ;)
$$ by itself returns the pid of the process, but in this context I gather it
dereferences the hash?
Regards,
Ron
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Morgan Norell
> Sent: Friday, August 24, 2001 8:51 AM
>
> $workingcopy =~ tr/$lettertochange/$lettertochangeto/g;
>
shot in the dark, taken from my shell scripting days
try {} around your variables
$workingcopy =~ tr/${lettertochange}/${lettertochangeto}/g;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTE
Folks,
I have a series of ~ 350 data points, I have been asked to get a running
average of each data
point.
IE:
data points 1 - 20
1: 30
2: 23
3: 1
4: 23
5: 34
6: 56
7: 85
9: 32
10: 89
11: 23
12: 34
13: 19
14: 94
15: 11
16: 19
17: 54
18: 23
19: 87
20 49
avg1 = (value1 + values2..11) / 10
av
Folks,
I have this little bit of code that was recommended by Peter Scott (not the
actual code, but he recommended using a SWITCH)
if ($test = /($regex)/o) {
SWITCH: for ($test){ # I think this is the problem right here,
not sure though
if ( /Communication/ )
ECTED]]
> Sent: Thursday, August 16, 2001 18:49
> To: Beginners (E-mail)
> Subject: Re: brainfart...need minor regex assistance
>
>
> --- "Yacketta, Ronald" <[EMAIL PROTECTED]> wrote:
> > Folks,
> >
> > I am loosing it today, for some odd rea
Folks,
I am loosing it today, for some odd reason I am banging my head against the
wall trying to
parse some sql output.
I have the following output:
SQL>
COUNT(*)
--
513
I just need the # in a variable (513)
could someone slap me silly for some help here?
Regards,
Ron
--
t SWITCH;
}
}
}
Regards,
Ron
> -Original Message-
> From: Peter Scott [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 14, 2001 16:13
> To: Yacketta, Ronald; Beginners (E-mail)
> Subject: RE: Code for review
>
>
> At 01:38 PM 8/14/
> $regex = 'join ('|', keys %lookFor);
> if (/($regex)/o) {
># Now switch on $1 for your specific sub-tests like /Factory/ etc
> }
>
could you kindly elaborate some on this part?
I thought one could only "switch" on numeric values?
switch {
case 1:
case 2:
case 3:
default:
}
Regards,
Ron
I spoke with Mr. Peter Scott and he informed me that I would be ok to
cut/paste my code in
an email and post it to the list, so with that said here it is..
Please be open and honest, I am looking to speed up the script and make it
more efficient as well
Regards,
Ron
#!/usr/bin/perl -w
us
Folks,
What format should one post code reviews in? attachments? script included in
email?
url?
Please advise
-Ron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanxs!
I was thinking I had to use a float
> -Original Message-
> From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 09, 2001 11:35
> To: Yacketta, Ronald
> Cc: Beginners (E-mail)
> Subject: Re: help with printf formatting please
>
&g
Folks,
I have this little tad bit of code
my $left = $timer - time();
my $min = $left / 60 % 60;
my $sec = $left % 60;
sleep $ARGV[1];
printf OFN "Time remaining until next egrep: %d:%d\n", $min, $sec;
works like a champ! except the output formatting
The
Folks,
I have been reading up on the Benchmark.pm, I thought it was possible to
time
a sub routine with timeit as such
$gt = timeit( 1 , &some_sub );
but I am getting errors in the Benchmark.pm
Use of uninitialized value at /usr/local/lib/perl5/5.00503/Benchmark.pm line
312.
bad time value ()
that would be great, but me being me I doubt it will
happen any time soon
> -Original Message-
> From: Peter Scott [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 07, 2001 12:20
> To: Yacketta, Ronald
> Cc: [EMAIL PROTECTED]
> Subject: RE: ideas to clean this up?
&
:[EMAIL PROTECTED]]
> Sent: Tuesday, August 07, 2001 12:20
> To: Yacketta, Ronald
> Cc: [EMAIL PROTECTED]
> Subject: RE: ideas to clean this up?
>
>
> [My rule is that beginners' questions arising from a thread on the
> beginners' list get answered on the
001 15:20
> To: Yacketta, Ronald; Beginners (E-mail)
> Subject: RE: ideas to clean this up?
>
>
> At 02:51 PM 8/6/01 -0400, Yacketta, Ronald wrote:
> >Thanxs!
> >
> >now off to modify my exec code that parses an entire array
> of files :)
>
> Of course, the
Thanxs!
now off to modify my exec code that parses an entire array of files :)
> -Original Message-
> From: Peter Scott [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 06, 2001 14:36
> To: Yacketta, Ronald; Beginners (E-mail)
> Subject: Re: ideas to clean this up?
>
Folks,
I have this butt ugly little perl code here, would like some ideas on really
streamlining it and cleaning it up.
opendir DIR1, "../logs/set1" or die "Can't open ../logs/set1: $!";
opendir DIR2, "../logs/set2" or die "Can't open ../logs/set2: $!";
opendir DIR3, "../logs/set3" or die "Can't
ject: RE: clearing memory
>
>
> > -Original Message-
> > From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 25, 2001 3:07 PM
> > To: Beginners (E-mail)
> > Subject: clearing memory
> >
> >
> > Folks,
> >
> > I
Folks,
I am drawing a blank here.. I am onsite at a customers location with
not perl books and perldoc is not installed :(
what is the quickest, cleanest , efficient way to clear out memory used by
an array and other
variables in a script?
We have a script that is continuously run and sleeps ev
will do...
> -Original Message-
> From: Blader Robert G DLVA [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 10, 2001 15:23
> To: 'Yacketta, Ronald'
> Cc: Beginners (E-mail)
> Subject: RE: Code review
>
>
> Just a suggestion - Would it be possible
> Code review is fine by me, however, I think the reviewers should
> probably send to you privatley.
>
> Casey West
I will ensure that I note that on the page
Folks,
I would like to have some code I am currently working on reviewed by some of
the more experienced
Perl users on this list. If this is ok, please let me know and I will
provide an URL
to the script in an effort to keep list spam to a minimum
Regards,
Ron
Folks,
What would be the most efficient, accurate way to time a sub
routine/function/script?
I am looking to time some parsing routines in my perl script, but need it to
be
accurate and not cause overhead/skew the output.
I have looked at the benchmark module, but am not to sure about it.
Should
Folks,
a really DUH question here..
what gives, I open a FH (open OFN ">>junk.out" );
I autoflush..
$| = 1;
do some parsing.. do some other gook
then go and print OFN "my output crud\n";
but yet, nothing is in file... UNTIL I close(OFN);
Huh? me loosing it here.. bring me back to sanity please
>
> Try splice here:
>
>my $third = int(scalar @allfiles / 3);
>my @set = ( [ splice @allfiles, 0, $third ], # first third
> [ splice @allfiles, 0, $third ], # second third
> [ @allfiles ], # the rest.
>);
>
umm sure, just go abo
1 - 100 of 141 matches
Mail list logo