RE: running a short perl script in a windows XP arena




Try printing out the result of the variables you are creating. Maybe
I'm just not getting what you're trying to do, but I don't think it's
doing what you think it's doing.


-----Original Message-----
From: DBSMITH@xxxxxxxxxxxxxx [mailto:DBSMITH@xxxxxxxxxxxxxx]
Sent: Wednesday, December 28, 2005 3:48 PM
To: Timothy Johnson
Cc: beginners@xxxxxxxx
Subject: RE: running a short perl script in a windows XP arena

ok I will take that out .... I reran it and still get the same error.
This
is not the problem.
Note: this is the correct way to do it within Unix.

Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams






"Timothy Johnson"

<tjohnson@xxxxxxx

eckpoint.com>
To
<DBSMITH@xxxxxxxxxxxxxx>,

12/28/2005 05:06 <beginners@xxxxxxxx>

PM
cc



Subject
RE: running a short perl script
in
a windows XP arena


















For starters, you aren't formatting your PATH variable correctly. That
should be a semicolon before "C:\\Perl".

-----Original Message-----
From: DBSMITH@xxxxxxxxxxxxxx [mailto:DBSMITH@xxxxxxxxxxxxxx]
Sent: Wednesday, December 28, 2005 2:01 PM
To: beginners@xxxxxxxx
Subject: running a short perl script in a windows XP arena

All,

Here is my script and it is outputting "file is not present" when it
should
be outputting "temp file is good and $MHfile is there\n";
Am I missing something since I am running this is a Windows env?
thank you,
derek


#!/usr/bin/perl

use strict;
use warnings;
require 5.8.0;
$ENV{"PATH"} = qq(C:\\Documents*\\mh-hl7:C:\\Perl\\bin);

my $p= qq(--passphrase-fd 0);
my $de= qw(--decrypt);
my $outp= qw(--output);
my $MHfile= qq(C:\\Documents*\\mh-hl7\\MHFM.*);
my $pass= qq(C:\\temp\\pass.txt);

# unlink qq(C:\\Documents*\\mh-hl7\\MHFM.*);

if ( -s $MHfile ) {
print "temp file is good and $MHfile is there\n";
open (PASS, "C:\\temp\\pass.txt");
for (;<PASS>;) {
print $_;
}
}
else {
print "file not present\n";
#system ("C:\\WINDOWS\\notepad.exe C:\\temp\\pass.txt");
}

close (PASS);

Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams



--
To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
For additional commands, e-mail: beginners-help@xxxxxxxx
<http://learn.perl.org/> <http://learn.perl.org/first-response>




--
To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
For additional commands, e-mail: beginners-help@xxxxxxxx
<http://learn.perl.org/> <http://learn.perl.org/first-response>





.



Relevant Pages

  • Re: Question on os.tempnam() vulnerability
    ... Under Unix you can safely create a temp file with ... I was asking how to create a named temporary file under Windows ... "Whether the name can be used to open the file a second time, ... platforms (it can be so used on Unix; ...
    (comp.lang.python)
  • RE: running a short perl script in a windows XP arena
    ... this is the correct way to do it within Unix. ... Derek B. Smith ... be outputting "temp file is good and $MHfile is there\n"; ... For additional commands, e-mail: beginners-help@xxxxxxxx ...
    (perl.beginners)
  • RE: running a short perl script in a windows XP arena
    ... running a short perl script in a windows XP arena ... be outputting "temp file is good and $MHfile is there\n"; ... Am I missing something since I am running this is a Windows env? ... Derek B. Smith ...
    (perl.beginners)
  • Re: Anyone know how to solve this Word problem ?
    ... set as the document location or the temp file location. ... when you quit applications or Windows itself. ... Word MVP web site http://word.mvps.org ...
    (microsoft.public.word.docmanagement)
  • Re: Anyone know how to solve this Word problem ?
    ... BTW I am sorry My PC is a win ME (My daughters is a Win98) ... > set as the document location or the temp file location. ... when you quit applications or Windows itself. ... > You can safely temporary files when the application that creates them is ...
    (microsoft.public.word.docmanagement)