John,
Both symbols are metacharacters when used in a regexp and must be escaped.
Try:
$del=\^;
Or better, try not using a scalar variable.
Just use the delimiter:
@fields = split /\^/,$record;
Paul
I use a variable for a field delimiter when reading
CSV files... I have been wrestling with the best
Hello,
We have been running into a problem when a spawned
process gets killed and leaves a text file locked.
The first question is, does NT accept signals much
like *nix does?
The second question is, when a spawned process gets
killed, can it first run through a wrap up routine to
clear the
Title: Signal Handlers PERL NT
Dear All,
I have developed a perl script. I want to make it execute at the time one
starts my machine. I have created a bat file which can execute the said script.
However I can not understand how to make this bat runwheneveranybody
switch on my machine? I
Title: Signal Handlers PERL & NT
Sandeep
If you are on windows 2000 you can do it by going to
Control Panel, double click on Scheduled Tasks, and run Add A Scheduled
Task
This allows you to either set a time to start, or to run
when your computer starts
I hope this helps
Regards,
Title: Message
Add a
shortcut to the batch file into the "Startup" group in "All
Users".
Run
Windows Explorer, open drive C, find the "Documents and Settings" folder. Open
it and find the "All Users" folder within it. Open *this" and find the "Start
Menu" folder inside it, this in turn
Title: Message
You
can also reach the Scheduled Tasks via
Start-Programs-Accessories-SystemTools
I'm
currently running a .bat that fires up two Perl scripts, every 6 minutes from
the Winodws Scheduler.
-Original Message-From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Title: Signal Handlers PERL & NT
Hello Sandeep,
I have experienced that this scheduled thing is not working
in every case.
Also the Startup alternative solution requires someone to
log in.
But if You need todo something when ever Your PC is
starting there is in Windows
Daniel Rychlik wrote:
Hello,
We have been running into a problem when a spawned
process gets killed and leaves a text file locked.
The first question is, does NT accept signals much
like *nix does?
Not really - there is no true signal interrupting mechanism.
Ctrl-C has some support,
John V. Pataki wrote:
I use a variable for a field delimiter when reading
CSV files... I have been wrestling with the best way
to code my split regex so that it works with all
possible values of that variable.
It is currently failing when I set the value of the
variable to ^
# if
Thanks for the reply Bill.
This program actually runs as a service, spawning
threads to write text files and sometimes those
threads die. When that happens we dont see a response
from the service until the file clears itself.
I will look into freeing the lock, perhaps I can hack
something
Daniel Rychlik wrote:
Thanks for the reply Bill.
This program actually runs as a service, spawning
threads to write text files and sometimes those
threads die. When that happens we dont see a response
from the service until the file clears itself.
I will look into freeing the lock,
Perhaps the best way to do this is to add a key in the windows registry. Place the new key at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Give it a value of the name of your script. Be sure to include a the full path.
Greg
[EMAIL PROTECTED] wrote:
Hello Sandeep,
I have
-Original Message-
I have developed a perl script. I want to make it execute at
the time one starts my machine. I have created a bat file
which can execute the said script. However I can not
understand how to make this bat run whenever anybody switch
on my machine? I am using
Hi all.
Hopefully this is not a truly dumb question.
So I finally got a chance to start trying this out and guess
what happens ...
$ perl helloworld.pl
Can't locate namespace.pm in @INC (@INC contains:
d:/Perl/lib/:/Perl/site/lib . ) at helloworld.pl line 1.
BEGIN
Hi,
I was reading the page at:
http://aspn.activestate.com/ASPN/docs/PDK/PerlNET/Options.html
and had some questions.
Normally, PLC will build the modules that the application
is dependent upon into the Executable (or DLL):
--freestanding
Build an application that will include all modules
Title: Signal Handlers PERL & NT
Try to edit in
the Registry ,
Run Regedit.exe
Go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
and in the right
pane create a DWORD Entry called 'PerlScript' and the Value to the the file with
the absolute path.
--Nikhil.
Wizards,
I know I'm going OT here with a Windoze question, but I'm not in the Win list anymore, sooo
Is there a non-fatal, non-Windows-error-causing, way to determine if:
1. the required 3.5 diskette is in the drive AND
2. the required directory exists on the diskette in the drive AND
3.
Look up the -x operator in the perl documentation. (it's not actually -x
it's a whole group of operators which start with dash and are a single
letter). This will tell you existence of files, and if they are directories.
I would assume they don't exist if the disk isn't in the drive (nor would
[EMAIL PROTECTED] wrote:
Wizards,
I know I'm going OT here with a Windoze question, but I'm not in the
Win list anymore, sooo
Is there a non-fatal, non-Windows-error-causing, way to determine if:
1. the required 3.5 diskette is in the drive AND
My guess would be
Morning coffee must have been diluted or something ...
I have rows starting with 0.
I have 3 fields on each row with and the numbers start
with 0 on the first row and continue...
ROW 0 = FIELDS 0,1,2
ROW 1 = FIELDS 3,4,5
ROW 1 = FIELDS 6,7,8
etc.
When I the user selects FIELD X, I need to
--- John V. Pataki [EMAIL PROTECTED] wrote:
Morning coffee must have been diluted or something
...
I have rows starting with 0.
I have 3 fields on each row with and the numbers
start
with 0 on the first row and continue...
ROW 0 = FIELDS 0,1,2
ROW 1 = FIELDS 3,4,5
ROW 1 = FIELDS
isn't it just
$row = int($fld / 3) ;
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John V.
Pataki
Sent: Friday, 29 October 2004 5:54 AM
To: John V. Pataki; active perl
Subject: Re: brain not functioning ... simple algebra problem
--- John V. Pataki
Thanks to all ...
This seemed to be simpler than I was making it ---
yes to the POSIX answer - cool
and yes to even simpler INT($A/3) answers
I think my brain was just telling me that INT would
round incorreclty up on some numbers and that it would
work for cases were it was .5 for example...
However, from the Perl Docs perlfunc:
int EXPR
int
Returns the integer portion of EXPR. If EXPR is omitted, uses $_. You should
not use this function for rounding: one because it truncates towards 0, and
two because machine representations of floating point numbers can sometimes
produce
Title: RE: brain not functioning ... simple algebra problem
You would use int to truncate (i.e., divide and throw away the remainder, or, if you prefer, always round towards zero), which was really the point of Mr. Pataki's issue. The perldoc is correct if you're interested in mathematically
[EMAIL PROTECTED] wrote:
Wizards,
I know I'm going OT here with a Windoze question, but I'm not in the Win
list anymore, sooo
Is there a non-fatal, non-Windows-error-causing, way to determine if:
1. the required 3.5 diskette is in the drive AND
2. the required directory exists on
26 matches
Mail list logo