quot; in front of it.
> > I made it executable with "$ chmod +x test", but when I run it nothing
> > happens (it just returns to another prompt). Any ideas?
>
> There is a Unix program called 'test' that you are probably running.
> Try renaming your pro
oldmask = umask 0;
# now mkdir or open your output file
umask $oldmask; # restore umask if you like
Optionally as mentioned, just use a CGI script to delete the files since
they run as www/wwwrite.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ /
;
while ($char ne "\n") {
seek FILE, $pos, SEEK_END;
read FILE, $char, 1;
print "char read: ", ord $char, "\n";
$pos--;
}
my $final = ;
print "Last line is: $final\n";
There's also a possiblity that the last char isn't
body have any suggestions how I can
> encrypt the data and it won't be too long? And, has anyone ran across this
> before??
Maybe you could use POST method instead of GET ?
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles
[0]) {
$salt = substr $_[0], 0, 2; # get first 2 chars for salt
# else create a salt using time, pid and rand
} else {
my $tmp = (time + $$) % 65536;
srand ($tmp);
$salt = $legal[sprintf "%u", rand (@legal)];
$salt .= $legal[sprintf "%u&q
ss module for
other solutions.
* Open /dev/tty and use the TIOCNOTTY ioctl on it. See the tty(4) manpage
for details. Or better yet, you can just use the POSIX::setsid()
function, so you don't have to worry about process groups.
* Change directory to /
*
#x27; or use a time in the past.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles http://www.todbe.com/
/ ) /--< o // // Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/
-/-' /___/_<_http://www.freeyellow.com/members/dbecoll/
__
ine where possible.
>
> Waiting for you help !!
Well I'll help you find a module to get started: File::Find
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles http://www.todbe.com/
/ ) /--< o // // Ma
"Ricardo Cumberbatch L." wrote:
>
> Hi every body,
>
> What the meaning of this $dio."bio"; exactly what is mean.
Better written as:
$dio . "bio";
append "bio" to the contents of the scalar vrbl $dio.
--
,-/-
I try to go from 2-digit to 1 digit i.e. (11,10,9)the
> final output would be "90". It appears that only the
> first digit is replaced with 9. Anyone have any
> suggestions? This would be useful in printing out
> progress of your program.
--
,-/- __ _ _
"$Bill Luebkert" wrote:
>
> Charles Lu wrote:
> >
> > If I wanted to print say 10 numbers but instead of
> > printing each number on a line, I want each successive
> > number to REPLACE the previous number so it appears
> > that the number is chan
st your code attempt if you can't get it to work.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.webjump.com/ (Free Perl site)
-/-' /___/_<_http://www.todbe.com/
___
captured affects the overhead that much.
Once you've done one, you've gotten the major overhead (I think).
Try timing them with benchmark module and see if it's really all that bad.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE
used; if STRING is too short,
nulls are written to fill out SIZE bytes. Return TRUE if
successful, or FALSE if there is an error. See also `IPC::SysV'
documentation and the `IPC::Shareable' module from CPAN.
--
,-/- __ _ _ $Bill
ld probably make sure that the text portion renders immediately and
the images can come later.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://
know how to make
> a new one.
Same way you overwrite a file. If it doesn't exist - it will be created.
open OUT, ">$die/$file" or die ...
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// //
ments, but I cannot get the chmod to
> run from within the script at all.
>
> I am on Perl 5 if that is of any consequence.
>
> Thank you for any aid you might offer.
>
> P.S. I read the security faq. Thanks for pointing that out.
--
,-/- __ _ _ $Bill Lue
run it as a setuid script in taint mode being careful to
not allow any other users access. Maybe put it under basic
authentication to start with and restrict it's functionality to
the aliases thingy. There are tons of things to learn when
administering UNIX and then the Perl implications on
tion:
> attachment; "."filename=\"myfile.txt\"\n";
> print MAIL "\n";
> if (open FILE,"<$myfile") {
> while () { print MAIL }
> close FILE;
> }
> print MAIL "\n";
I would switch to MIME::Lite which handle
Can this be done? what stupid, simple thing am I missing?
Haven't played with broadcasting in Perl, but try experimenting with:
setsockopt to SO_BROADCAST
and the addr INADDR_BROADCAST (which should be equiv to inet_aton('255.255.255.255')).
--
,-/- __ _ _
"The text and message goes here.\n";
>
> # Now send the message:
> open (MAIL,"|/usr/lib/sendmail -t");
> print MAIL $message;
> close (MAIL);
Have you tried setting the Reply-To header to where you want the reply
to go. Can't guarante
}
# or you could read it into an array and use grep
my @array = ;
my @finds - grep /$expr/, @array;
close FH;
Make sure you escape $expr properly if there are reserved chars in it.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles
f that's not the purpose). A little more background might help.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site
me? can I wrap a $ftp->get in an alarm?
Luckily you are on UNIX, so alarm should take care of it for you.
See perlfunc alarm function for example. You could probably sleep
and try again once or twice after the initial failure.
--
,-/- __ _ _ $Bill Luebkert ICQ=1443
#x27;s call longmess
# to generate a full stack trace. We use the magical form of 'goto'
# so that this shortmess() function doesn't appear on the stack
# to further confuse longmess() about it's calling package.
goto &longmess;
--
,-/- __ _ _
; "."filename=\"wsr-pro.txt\"\n";
>
> print MAIL "\n";
>
> if (open CONF," while () { print MAIL }
> close CONF;
> print MAIL "\n";
> print MAIL "\n";
> }
>
> =
>
> Any clues?
s the error: $ERRMSG\n";
> warn "This is the error: $ERRMSG\n";
> }
> }
> $notreally=0;
> nearlyfatallywounded "This is a Legitimate Error.";
> close;
>
> How do I keep the subroutine from being executed just because it is being
> parsed?
Works fin
g;
>
> What could be the problem?
>
> Both script works fine and no errors when running them into the
> debug.
Good chance you need to escape the @ in the email address. Can't tell since
you didn't figure it was necessary to supply any code.
Next time create a small standa
nd stat each file and add to a vrbl. You can prune if you don't
want to recurse into the subdirs.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/
uld just CC or BCC all of them (read the file in and create a BCC line for
each or you may be able to comma separate on one line - experiment or check the
docs).
You could use Net::SMTP, the UNIX sendmail task or MIME::Lite to do the actual
sending.
--
,-/- __ _ _
pache, IIS, etc.)
and you didn't supply it.
3) If your server is owned by your ISP - that config could be radically
different from the normal setup.
More info please. Make sure you're script is in your cgi-bin dir
and has the right perms on it 0755 usually.
--
,-/- __
\n";
> exit;
1) You don't want to escape the . in the filename.
2) You closed the file before you printed the two lines to it - move
the close to after the prints.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mail
l.
You should be able to get debug turned on if you switch
to Net::SMTP in MIME::Lite.
Untested:
MIME::Lite->send('smtp', '.com', Debug => 1);
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles
t;host;
my $query = $u->query;
my @response = ($scheme, $opaque, $authority, $path, $fragment, $host, $query);
print STDERR "scheme=$scheme\n" if $debug;
print STDERR "opaque=$opaque\n" if $debug;
print STDERR "authority=$authority\n" if $debug;
s when I enable the mailing functions. If I turn
> the mailing functions off, it runs perfectly fine.
>
> Has anyone seen this with Mime:Lite before?
Not really, but did you upload the script using text mode to strip
the CR's when you went to a UNIX box ?
--
,-/- __ _ _
d avoid sharing of files that are NFS'd.
What error are you getting when the close fails - ie: what's in !$ and why
aren't you printing it ?
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // //
> '$long_desc', '$weight', '$link'));
>print "$string";
> }
>
>
>
> open(OUTF,">formatdata.txt") or return "Can't find file: formatdata.txt:
> $!";
>
> print OUT
r Apache.
You can easily do the includes from your CGI script though.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_http://www.tod
box.
yes, no, no.
Check out Tie::Hash which will allow you to use a disk DBM file as hash.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Pe
4645 b03 3524 switch 10.3.xxx.xxx 3
new: 20011219 074645 b03-3524-switch 10.3.xxx.xxx 3
old: 20011206 175228 b50 suite-Y switch-A 10.50.xxx.xxx 1
new: 20011206 175228 b50-suite-Y-switch-A 10.50.xxx.xxx 1
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
3, $field4);
my @filedata = ('f12345', 'abcdefg', 'hijklmn', 'opqrstuv');
foreach my $line (@filedata) {
# I split this into 2 lines to simplify the eval and added a [0]
# which seemed right for the data structure
$/g; # last \ may be unnecessary
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_http://www.todbe.com/
___
AUTH_TYPE = basic
REMOTE_USER = username
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_&l
# 06-Feb-2002
my $time = strftime ("%H:%M:%S", localtime);# 14:22:00
open OUT, '>filename' or die "Error opening 'filename': $!\n";
print OUT $date, "\n";
print OUT $time, "\n";
close OUT;
__END__
--
,-/- __ _ _ $
nd those are the only two keys that were added (AUTH_TYPE REMOTE_USER).
NS also has these two from the browser that MSIE doesn't have (on my tests):
HTTP_ACCEPT_CHARSET HTTP_KEEP_ALIVE
which really have no bearing.
>>-Original Message-
>>From: $Bill Luebkert [ma
ons to proceed.
Either of these two methods or both should work:
use strict;
my $user = (defined @ARGV) ? shift @ARGV : "Anonymous";
# Method 1: if STDIN is a tty
if (-t STDIN) {
die "perl $0 < data.txt";
}
# Method 2: checking for file
if (-f STDIN) {
a static init of an array). Show the
looping part of it to.
With that done, we should be able to figure out exactly what you want and
where the data/vrbls are coming from.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EM
")) {
# process an error here
}
print MAIL "To: $mailto\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n";
print MAIL "\n";
print MAIL $mail_msg;
print MAIL "\n";
close MAIL;
--
,-/- __ _ _
m command?
No, they would be sourced by any shell that was spawned (if that syntax were allowed),
but would not make it back to the Perl script that did the system call. A more likely
version would be 'system "/path/to/some/shell -c . script_name.scr"'. Fur
t does the
> redirect..
Are you talking IP address here or what ?
If so, check $ENV{REMOTE_ADDR} for the IP address of the requesting browser (or
proxy).
If not, please explain yourself a littlemore succintly.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// /
ready authenticated, so
you shouldn't need it.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl
also try to deal with the "'s in the split, but you'll end up with some
extra fields with just " in them. EG:
my @data = split /"\s*,?\s*"/, $lines; # would need cleanup on ends of array
So I would leave them and drop them later wh
hundreds of ways to do it. You could read the lines into
an array and join them with a ','. Then do your split.
my @array = ;
my $lines = join ',', @array;
my @data = split /,/, $lines;
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
Walter Usyk wrote:
> I'm a Perl newbie and would like to know what is the most effecient way
> to remove a particular element from an array.
I would think splice would be the easiest.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE C
e 'alarm' function ?
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_http://www.todbe.com/
_
big deal ? You get the pid back after each fork, just store
it in an array and you can keep track of how many you have forked.
Use waitpid to reap the children periodically (with WNOHANG unless the
parent has nothing else to do).
--
,-/- __ _ _ $Bill Luebkert ICQ=1443985
[EMAIL PROTECTED] wrote:
>
> Thanks to all of you. Problem solved !
$last_char = chop $dir;
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (
gs):
$request->header('Content-Length', length $post_args);
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/
t;
> Is there an easy way to do this?
If you can slurp the entire file into a vrbl:
You can slurp the file:
{ local $/ = undef;
$_ = ;
}
And then add a \s* to your RE (to pick up the newline):
s|(\s*)|$1|smg;
print $_;
__END__
--
,-/- __ _ _ $Bill Luebkert IC
ld suggest you use Net::FTP instead - much easier (otherwise you would
basically have to re-implement FTP protocol).
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.t
ters
> in the file detached from a e-mail.
I don't think it can easily be done in the Parser.
Slurp the file and delete the \r's (\x0d or \015) and rewrite if you must.
On Win32, you would also need to binmode the FH before writing.
--
,-/- __ _ _
ere to where Perl really resides. I don't think #!perl will
work on UNIX (does [or did] or Win32 prior to 2.x.x Apache from command
line - don't remember if it works from Apache).
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibl
Using a hash for the cookie value is going to concatenate them all
together with &'s. I would either use multiple cookies or concatenate
the hash together myself into $value and pass it that way. I'm not
sure what the intent was for using a hash for the cookie value.
--
,-/- __ _
/~/, $cgi->cookie('userdata');
# sample snippet:
use strict;
use CGI;
my $cgi = new CGI;
my $cookie = $cgi->cookie(-name => 'userdata');
if ($cookie) { # if userdata cookie already set
print $cgi->header();
my %values = split /~/, $coo
rors or
feed the errors back to the browser with something like this:
BEGIN {
use CGI::Carp qw(carpout fatalsToBrowser);
&carpout (\*STDOUT);# back to browser or use a log file
#
warningsToBrowser(1);
# add warnings too if you like (carpout should handle)
}
; Any way to do this?
Try adding a prune to your code (just a guess):
if (-l _) { $File::Find::prune = 1; return; }
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://
... or die "cannot create counter file: $!";
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_http://www.todbe.com/
er/counter.txt - $!";
> print OUT $keycounter;
> close(OUT);
>
> return ($keycounter);
>
> }
Check the perms on the directory that it is in to make sure you
have the perms to read and write to a file in it. Make sure you
know what user you are running as if it's
thing at all.
>
> while ($string =~ /process(\S+(?!\|)(\s\S+)*)/g) {
>print "\tbiological process\t$1\n";
> }
>
> Correction to this code or an alternative suggestion is highly appreciated.
This should handle the situation above:
while ($string =~ /proc
get that
> one extra zeros.
>
>
>
> Are there any format specifier like C in perl.
perlfunc man page is your friend. Look under (s)printf.
PS: please post plain text only to this list.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// //
# where ^V and ^M are ctrl-V and ctrl-M
or this may work (or maybe not on UNIX, but it will on Win32):
:set notextmode # change to textmode
:w # write the file
:e! # re-edit the file
--
perlfaq8:
How do I start a process in the background?
You could use
system("cmd &")
or you could use fork as documented in the section on "fork" in the perlfunc
manpage, with further examples in the perlipc manpage.
--
,-/- __ _ _ $Bill Lue
"testexec1.pl", I get core dump.
> I can do it when I reset:
> LD_PRELOAD=;export LD_PRELOAD
> But I cannot connect to Oracle.
I don't know what LD_PRELOAD does to affect the backgrounding,
did you try fork and exec and if necessary reset LD_PRELOAD in
just one of the m
taguti wrote:
>
>>did you try fork and exec
>>
>
> No I don't like to do it if possible.
You know a system call basically does a fork and exec except it
waits for the call to finish.
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/
k minus the problem above.
You could try using gethostbyname first and passing the dotted addr to ping.
use Socket;
my @addr = gethostbyname ('0070123');
print "@addr\n";
print inet_ntoa ($addr[4]), "\n";
__END__
--
,-/- __ _ _ $Bill Luebke
a couple (not sure if they handle SSL):
http://www.stonehenge.com/
in particular, you might find something useful in here:
http://www.stonehenge.com/merlyn/WebTechniques/
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Ma
rs like \x00-\x1f and \x7f-\xff in there too.
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
=> 6, 'aug' => 7, 'sep' => 8, 'oct' => 9,
'nov' => 10, 'dec' => 11);
use Time::Local;
$date =~ s/^\[//; $tz =~ s/\]$//;
my @t = split ':', $date;
my @d = split /\//, $t[0];
$d[1] = $mons{lc $d[1]};
my $off = 0;
$tz =~
nes) {
my @f = split /\s*[:-]\s*/, $line;
$hash{$f[0]} = $f[1];
}
I'm assuming you have the newline problem in hand.
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripo
$Bill Luebkert wrote:
> karthikeyan wrote:
>
>> Dear All,
>>
>> Hope you are all having a great day.
>>
>> I have a problem. I m running a java program through perl like this :
>>
>> $cmd = 'java SSLTest';
>>
>
dumping the data in hex and see if maybe you have \r's instead of
\r\n's.
If there really are no line endings, you could search for the first :
(preceded by a non-digit) or - (surrounded by WS) and then pick up the
stuff between there and the next one as the value (minuse the last word
use the POSIX::setsid()
function, so you don't have to worry about process groups.
* Change directory to /
* Reopen STDIN, STDOUT, and STDERR so they're not connected to the old
tty.
* Background yourself like this:
P may come in handy.
When you have more specific questions, repost.
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /
ubstr($_,0,3) = $WeekStr[substr($_,0,1)]
> if substr($_,0,3) =~ /[0123456]\x00\x00/;
> }
> return @in;
> }
You could try something like this:
my @res = &sortByWeek ('FRI0101', 'TUE0202', 'MON2359');
print "@res\n";
sub sortByWeek {
.
> Please HELP !!
What do you mean you can't detach it ? Detach from what ?
Are you having trouble doing the upload or what ?
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ )
ck 'SLS', $buf;
read IN, $buf, 6 or die ...
my ($ST, $LTP) = unpack 'SL', $buf;
close IN;
__END__
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // //
Craig B. Nakata wrote:
> Normand,
>
> Looks like there's a quote missing on the subject line.
And a missing new Mail::Sender() line.
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
ced is wrong - show what it output and what it should be.
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_&l
mple enough. Pseudo code:
open IN ,,,
open OUT ...
while () {
if comment
print to out
else
breakdown line into fields
foreach field
write field to OUT
endfor
endif
}
Maybe there's
12.47 // (a9f3702f converted to decimal )
>
> I mean to retrieve the IP from the Hex hidden inside
use Socket;
$_ = "\x00\x02\x0b\xb8\xa9\xf3\x70\x2f\x00\x00\x00\x00\x00\x00\x00\x00";
printf "v6=%d\n", unpack 'n', substr $_, 2, 2;
printf "v7=%s\n",
# or mtime is 9
my $age = (time - $ctime) / 86400;
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/
last modified not accessed.
Post your failing code snippet so we can debug it for you.
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Pe
my $age = int (($time - $mtime) / 86400); # did int to drop fraction
print "time=$time, mtime=$mtime, age=$age\n";
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // //
e File::stat, you would do it more like:
use File::stat;
my $st = stat($filname) or die "stat($filename): $!";
my $time = time; # broke time out to print
my $age = int (($time - $st->mtime) / 86400);
print "time=$time, mtime=$st->mtime, age=$age\n";
--
,-/- __
ata. I export my Excel files in tab delimited text files, but I
know you can also import/export comma-delimited files. Each tab or comma
will cause the next column to fill and each newline will take you to the next
row.
--
,-/- __ _ _ $Bill Luebkert ICQ=1621261
27; in debug)
> prior to entering the loop.
>
> So far as I am aware, I need to define the array outside the 'foreach'
> loop so that I can use it in the 'replace' statement.
>
> So what is the accepted method of populating that first element of the
sys::DiskFree.
I would think that just using any file on that FS would work (can't test here):
my $handle = new Filesys::DiskFree;
my $avail = $handle->avail('/usr/people/charles');
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )
tinguish between the two?
$email =~ s/^www\.//i;
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-
can play with HTML::Parser or try a simple RE on it:
my @scripts = $html =~
m#\s* \s*#gis;
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for
= (stat _)[9];# get epoch last modification time
next if $ftime < $start;# skip older than start time
next if $ftime > $end; # skip newer than end time
print "$_\n";
}
__END__
--
,-/- __ _ _ $Bill Luebkert I
1 - 100 of 283 matches
Mail list logo