first three chars
Next time give an example of input and expected output and we
could get more specific.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles http://www.wgn.net/~dbe/
/ ) /--< o // // Mailto:[EMAIL PROTECTED] http:/
ese instances simultaneously
> (other than using fork? becos I'm not too sure how to use it... :|)
Did you read perlfunc docs on exec? The first sentence ought to give
you a clue:
The `exec()' function executes a system command *AND NEVER
RETURNS* - use `system()' i
ot sure Win32-API has been ported to 506 yet. Works ok on 98se with 522.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles http://www.wgn.net/~dbe/
/ ) /--< o // // Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/
-/-' /___/_<_http://www.freey
bution+name+or+description&join=and&arrange=file&download=auto&stem=no&case=clike&site=ftp.funet.fi&age=
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles http://www.wgn.net/~dbe/
/ ) /--< o // //
ne provide some insight. I need to be able to copy files.
> >
>
> Since you are escaping the last backslash why not the others?
My first thought also, but what are the only two chars you escape inside 's?
Answer: \ and ' So the last \ was to make sure the
Mike Reilley wrote:
>
> Hi all,
> Can some one point me in the direction to do file copies from with in a
> PERL program??
> I am using 5.6 on win/98 5.6 on win/95
> must be able to handle windows LFN
Duh ... Maybe standard module File::Copy ???
--
,-/- __ _ _
ent_length);
>
I assume it's because your shebang line is wrong. The # has to come first.
Maybe try instead:
#!C:/perl/bin/perl/exe
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles http://www.wgn.net/~dbe/
/ ) /--< o // //
Leigh has no control over how the path is specified since he has to
supply something like '/cgi-bin/subscribe.cgi' as a URL. Apache is quite
capable of creating a new process and getting the /s correct. Even if \s are
used internally to create the process, they don't have to be u
to client PC didn't
> work and return the error message: internal server error. Why and How i am
> going to solve this problem?
Try dropping the system call and use File::Copy instead. If you still have
problems - repost.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439
if there is a CR on the shebang line (due
to binary upload from Win box).
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles http://www.wgn.net/~dbe/
/ ) /--< o // // Mailto:[EMAIL PROTECTED] http://dbecoll.webj
ork from the command line either.
I don't have mod_perl to test with. My comment is in regards to
standard CGI using Apache server.
The command line has nothing to do with it since that's a different
program (whatever shell you happen to be using).
--
,-/- __ _ _
,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks)
> = stat($f);
my $mtime = (stat $f)[9]; # much simpler
> if($mtime > $y && -f $f) {
> $new_file = $f;
> $y = $mtime
> }
> }
> print("$new_file\n");
Now you ca
responding filename.
Now copy to another vrbl and remove the numbers using an RE (eg: s/\d+//; or some
such).
5) Use File::Copy to copy the orig file to the new name in other dir.
Many ways to do it, make an effort and get back if you have trouble.
--
,-/- __ _ _ $Bill Lu
hat should I do?
Read your Apache docs: http://localhost/manual/mod/mod_include.html
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles http://www.wgn.net/~dbe/
/ ) /--< o // // Mailto:[EMAIL PROTECTED] http://d
my $date = sprintf "%02u/%02u/%02u %02u:%02u:%02u", $t[4] + 1, $t[3],
$t[5] % 100, $t[2], $t[1], $t[0];
print $date, "\n";
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles http://www.wgn.net/~dbe/
/ ) /--<
is UNIX.
> 230
> ftp> quit
>
> I need to parse this text to know what state the server is in. Any ideas
> how I can get access to the text? $ftp->login only provides me with the
> success/failure status.
Not easy to get at, but try (assuming $ftp is your object):
line;
> }
>
> close FILEHANDLE;
> return $stream;
> }
>
> $path = 'd:\test\a.pdf';
> $stream = readf($path);
> $l = length($stream);
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles
need them.
eg: $path =~ s/\//\\/g if ($^O =~ /Win32/i);
If the system returns \s, you may want to immediately convert them back
to /s to maintain your script portability.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibl
it or try a FH reference.
I believe it expects a ref rather than a scalar. The docs are incorrect/non-specific
on the matter, but the code checks for a ref.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / )// // DBE Collectibles http://www.wgn.net/~dbe/
/ )
19 matches
Mail list logo