RE: REmoving lines from a file

2002-10-31 Thread Tillman, James
Hi, i wonder how to remove the 4 first lines of a file in Perl? How does this admittedly lazy-brained script work for you?: --- open(IN,filetosnip.txt) or die $!; open(OUT, tempfile.txt) or die $!; $line = IN;$line = IN;$line = IN;$line = IN; while($line = IN) { print OUT $line; }

RE: REmoving lines from a file

2002-10-31 Thread Joseph P. Discenza
[EMAIL PROTECTED] wrote, on Thursday, October 31, 2002 7:56 AM : Hi, i wonder how to remove the 4 first lines of a file in Perl? Assuming you've set up IN and OUT as filehandles: my $i = 0; while IN { if ($i 4) { $i++; } else { print OUT $_;

Updating wins problem

2002-10-31 Thread steve silvers
The below Perl snippet keeps giving me prototype mismatch errors. The script runs via command line to change the wins entries. ERRORS Prototype mismatch: sub main::NULL () vs none at (eval 1) line 5. Constant subroutine NULL redefined at (eval 1) line 5. Prototype mismatch: sub

RE: Updating wins problem

2002-10-31 Thread Stanley . G . Martin
I've seen this problem when I include the line: use Win32; To get around it, whenever I use a function from Win32 I simply fully qualify it. Ex. $machine = Win32::NodeName(); I can then remove the 'use Win32' line. Stanley G. Martin Sprint - ISS Enterprise App/Decision Support Services

Implementing a queue, memory

2002-10-31 Thread Thomas Drugeon
hello, I am implementing a queue, using shift and push to put and remove elements from an array. The problem is that I don't know how Perl will manage the memory. Do you have experiences on such arrays after a big number of shift/push? Will Perl reallocate former used memory (relased from the

Re: SQLServer DBI Woes

2002-10-31 Thread Thomas R Wyant_III
Carter, I'm with Johan Lindstrom - bind variables are the way to go. If you're unfamiliar with them, they're a little strange at first. The following is your script cold-coded to use bind variables and placeholders. # Create the Insert my $SQL = -- sql end --; INSERT INTO scmrequests (Status,

Re: CGI.pm, closer popup_menu

2002-10-31 Thread $B#t#a#g#u#t#i(B
lstein What do you want. The version with the newline or the version without? The lstein current version (2.89) has no newline, and therefore should give you the lstein popup menus closer Yes, exactly. The problem was I had old version with the newline in /Perl/bin which was working I was

Norton Antivirus vs. Perl [was RE: Failure in backticks]

2002-10-31 Thread Thomas R Wyant_III
No problems with: Norton Antivirus Corporate 7.60.926 ActivePerl 633 Windows 2000 SP2 (5.00.2195) Tom Wyant This communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended

RE: Source-Code-Protection

2002-10-31 Thread FARRINGTON, RYAN
Title: RE: Source-Code-Protection Harald, Perl2exe http://www.indigostar.com is shareware but you can always use it to make executables... I use it for the same reason here at the office and I make sure I am the only person with access to the source... -Original Message- From:

Re: AW: Source-Code-Protection

2002-10-31 Thread Morbus Iff
Jep, I know. I like Open-Source. But sometimes there are some people grabbing your work and telling people its theirs... I cases like that some protection comes in very handy... Yeah, but there's nothing to stop people from doing that with closed source either - using ResEdit on the Mac, I could

RE: Source-Code-Protection

2002-10-31 Thread Morbus Iff
Perl2exe http://www.indigostar.comhttp://www.indigostar.com is shareware but you can always use it to make executables... I use it for the same reason here at the office and I make sure I am the only person with access to the source... That won't help you if people get your .exe. See:

avtc.com test

2002-10-31 Thread Thomas R Wyant_III
This communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or

RE: Source-Code-Protection

2002-10-31 Thread Peter Eisengrein
Title: RE: Source-Code-Protection you could always write your apps as a CGI on a web server that only you have access to. You could also write client/server apps (using IO::Socket perhaps) -- of course your rogue code thieves would still have access to the client-side code... CGI would

Win32::AdminMisc -- Any risks??

2002-10-31 Thread Krishna, Hari
Hi Friends, This is more of a general question pertaining to Win32::AdminMisc I have had problems with Win32::AdminMisc. You know, I was working on a web project and needed to authenticate the Username and password on the website to that of the Network. You guys helped me a lot

RE: Source-Code-Protection

2002-10-31 Thread Tillman, James
Title: RE: Source-Code-Protection True. Or one could use Soap::Lite for selected portions of thecode, and have the main perl script connect to the SOAP server to run the "meaty bits". Still, this is a lot of trouble. I'm pretty much with Morbus on this one. License your code properly and

Re: avtc.com test

2002-10-31 Thread Thomas R Wyant_III
All, My apologies to the list for the previous empty note. Starting about a day ago, everything I post to this list gets the following reply from System Attendant [EMAIL PROTECTED]: Trend SMEX Content Filter has detected sensitive content. Place = [EMAIL PROTECTED]; ; Sender = Thomas R

Using PPM packages for 5xx and 6xx on the same machine

2002-10-31 Thread Thad Schultz
This question has been bugging me for a while now and I am hoping some of you out there can tell me if my thinking is on-track or am I way off on this one. Say I've successfully written a daemon to monitor a directory for me using Win32::Daemon and Win32::ChangeNotify. Win32::ChangeNotify only

Re: Implementing a queue, memory

2002-10-31 Thread Johan Lindstrom
At 14:39 2002-10-31 +0100, Thomas Drugeon wrote: Will Perl reallocate former used memory (relased from the shift) to next elements (from the push)? IIRC perl is optimized for that scenario (I can't remember where I read it though). It shouldn't be a problem. /J -- --- --

Re: Implementing a queue, memory

2002-10-31 Thread Thomas Drugeon
Thank you Do you know any module implementig such queues in a file? like dmb tied hashes do? IIRC perl is optimized for that scenario (I can't remember where I read it though). It shouldn't be a problem. /J ___ Perl-Win32-Users mailing list

Re: Implementing a queue, memory

2002-10-31 Thread Thomas Drugeon
Sorry, I found it: Tie::File - Original Message - From: Thomas Drugeon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 4:34 PM Subject: Re: Implementing a queue, memory Thank you Do you know any module implementig such queues in a file? like dmb tied

Re: Help using XML::Parser

2002-10-31 Thread Todd Beverly
Thomas R Wyant_III wrote: snip The things that XML::Simple will lose for you include: snip * The order of duplicate tags (e.g. multiple Member tags). Does this mean that contents of the value array in the code below could be out of order? I ran it through 10 value/value tags and

RE: Win32::AdminMisc -- Any risks??

2002-10-31 Thread Gould, Kevin
Put down the keyboard and step away from the computer and I'm sure you'll be safe :-) You have nothing to worry about as a consequence of the module in and of itself. There is no particular reason that AdminMisc would blow anything up any more than any other arbitrary application or

RE: Excel, OLE, and Activestae PERL 5.6.1 rel 633 on Windows 2K.

2002-10-31 Thread Daniel Needles
Chuck, Thanks for all the help. I found the problem. This one is rather embarrassing, but interesting so I thought I'd let the group in on it. I was racking my brain thinking what the hell could enforce permissions out side the standard Win2K user stuff. Then I remembered. A while back I

RE: Win32::AdminMisc -- Any risks??

2002-10-31 Thread Krishna, Hari
Kevin, gotcha.. Hope I didnot sound like Blowing the computer. I meant the hardware crash or corrupting the windows functionality or scripts like winlogon.exe. I just wanted to make sure I am not doing something that comes haunting(I know today is halloween). all I am doing is checking if a

Re: Inline::C Win32 w/ adk

2002-10-31 Thread Sisyphus
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 17, 2002 12:14 AM Subject: Inline::C Win32 w/ adk I would like to use the Inline::C module to write C code within a Perl script. Inline works fine for basic C code, but I'm having problems when

(no subject)

2002-10-31 Thread NAMIHIRA Hachiro
password (B (B_ (BHP $B$d%a!<%k%"%I%l%9$r<+J,$@$1$N%*%j%8%J%k$K(B MSN $B%I%a%$%s(B (Bhttp://onamae.msn.co.jp/ (B (B___ (BPerl-Win32-Users mailing list ([EMAIL PROTECTED] (BTo

Re: File::Tail

2002-10-31 Thread Sisyphus
- Original Message - From: Patra, Anupam [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 01, 2002 9:21 AM Subject: File::Tail I am getting the following error while executing perl Makefile.pl File::Tail will be installed without debugging information. This

RE: [ANN] Win32::Daemon::Simple 0.1.0

2002-10-31 Thread Dave Roth
As always, Jenda, you absolutely ROCK! This is great! About a year ago I started to add code to the extension so that you could register callback routines for each event (pause, stop, continue, interrogate, etc) so that you could let the extension perform the looping and all your code would have

Re: Excel, OLE, and Activestae PERL 5.6.1 rel 633 on Windows 2K.

2002-10-31 Thread Carl Jolley
On Wed, 30 Oct 2002, Daniel Needles wrote: Hello, The following program: use strict; use warnings; use Win32::OLE; my $xlfile ='c:\tmp\Book1.xls'; my $xl_app = Win32::OLE-new(Excel.Application); $xl_app-{'Visible'} = 0; my $workbook = $xl_app-Workbooks-Open($xlfile);

Re: While

2002-10-31 Thread Carl Jolley
On Wed, 30 Oct 2002, Cristian Carvajal wrote: I have a question regarding to an aplication I am working on with an ulimited while cicle While (1) { #code } This cicle keeps asking until one of the exit functions appears to finish the cicle. My problem is that the cicle consumues

Re: Source-Code-Protection

2002-10-31 Thread Carl Jolley
On Thu, 31 Oct 2002, Harald Wopenka wrote: I think its a common problem with Perlprogs that u cant hide your sourcecode. I heard about something like pl2exe but I dont think it works and I even more dont think its free. A couple of month ago I saw a nice protection: #!/usr/bin/perl use

RE: REmoving lines from a file

2002-10-31 Thread Carl Jolley
On Thu, 31 Oct 2002, Tillman, James wrote: Hi, i wonder how to remove the 4 first lines of a file in Perl? How does this admittedly lazy-brained script work for you?: --- open(IN,filetosnip.txt) or die $!; open(OUT, tempfile.txt) or die $!; $line = IN;$line = IN;$line = IN;$line = IN;

Re: Source-Code-Protection

2002-10-31 Thread Matthew Greenberg
You can protect your code by creating an exe using perlapp. You can get an evaluation license for free (valid for 3 weeks). Matthew Greenberg - Original Message - From: Harald Wopenka [EMAIL PROTECTED] To: Perl-Win32-Users [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 4:46 AM

Re: Apache-Session

2002-10-31 Thread Randy Kobes
On Thu, 31 Oct 2002, Issa Mbodji wrote: Is there an Apache-Session module for window users? If so could someone please send me the link so that I can download it. We have an Apache-Session ppm package in our repository at http://theoryx5.uwinnipeg.ca/ppmpackages/ -- best regards, randy

Re: Implementing a queue, memory

2002-10-31 Thread Carl Jolley
On Thu, 31 Oct 2002, Thomas Drugeon wrote: Thank you Do you know any module implementig such queues in a file? like dmb tied hashes do? IIRC perl is optimized for that scenario (I can't remember where I read it though). It shouldn't be a problem. Although I haven't tried it,

Re: Please help: Out of Memory

2002-10-31 Thread Carl Jolley
On Thu, 31 Oct 2002, Mohanty, Debi (MED, TCS) wrote: Hi Howard, I tried to run the program with my 305MB file, but I got the error saying Out Of memory. The program I am using is $/ = '@F' . chr(0x0D) . chr(0x0A) . chr(0x0D) . chr(0x0A); open (INFILE, input.dat) || die failed!;

Re: Source-Code-Protection

2002-10-31 Thread Mike Kalinovich
Just some thoughts from the administrator point of view here; Any scripts that we write during company time for the company are technically the property of the company we work for. The company decides what they want you to do. If they're to be used in consulting, than the writer must specify

Re: Perl using Windows Media 9 Encoder

2002-10-31 Thread Carl Jolley
On Thu, 24 Oct 2002, Fabricio Soares Martins - Site CBN - SGR wrote: Hi everybody! I did install the windows media 9 with the Cscript for encoding. When i try to call this script from a cgi, the error message appears: CScript Error: Loading your settings failed. (Access is denied. )

Scripting Add/Remove Uninstallation

2002-10-31 Thread henry isham
All, I don't know if this was discussed before, but here it goes. I'd like to trigger an uninstallation from the Add/Remove Programs applette from Windows' Control Panel, and let the program's uninstallation routine run its course. Is there a module that I can use? If there is, any pointing

Get output from CreateProcessAsUser

2002-10-31 Thread Scott_Groth/MO/americancentury
Hi All, I have a Perl app that executes a robocopy to move some files from a remote server to the local server. The Perl app is executed from a web page and has SYSTEM permissions (as near as I can tell). I'm using Win32::AdminMisc::LogonAsUser and CreateProcessAsUser to elevate the permissions

RE: Scripting Add/Remove Uninstallation

2002-10-31 Thread Dave Roth
Use Win32::OLE and WMI. -Original Message- From: henry isham [mailto:henry;hish.net] Sent: Thursday, October 31, 2002 12:28 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Scripting Add/Remove Uninstallation All, I don't know if this was discussed before, but here it goes. I'd

RE: difficulties mailing on win32 - none on Unix

2002-10-31 Thread Ronan Oger
Krynicky, This is just a guess, but are you relying on sendmail to send your emails? if so, sendmail is a *unix* script. You need an SMTP server on your box. Make sure you've got an SMTP server. Ronan -Original Message- From: [EMAIL PROTECTED]

RE: difficulties mailing on win32 - none on Unix

2002-10-31 Thread Ronan Oger
You wrote: 1. Please do not top-post. 2. Please read the message you reply to! I did not ask, I was replying to M.Hall. HE was having problems. And he tried Net::SMTP and Mail::Sender modules that are NOT dependent on sendmail executable being available. You are right though that he needs an

Re: Trimming Leading and Trailing Whitespaces

2002-10-31 Thread Richard Lippmann
At 12:44 30.10.2002 -0500, Stephens, Wes (N-Sybase) wrote: Is there a string manipulation function to automatically trim leading and trailing whitespaces? No, but do it with regex: $string =cat and dog ; # trim beginning ws $string =~ s/^\s+//; # trim ending ws $string =~ s/\s+$//;

Release of ActivePerl 5.8.0

2002-10-31 Thread Robert Allerstorfer
Hi, does anybody know why ActiveState still has not released their Win32 port of Perl 5.8.0? 5.8.0 is the current stable release and is out since July 18. Maybe someone from ActiveState could say when something could be expected. Thanks, -- rob. ___

RE: Trimming Leading and Trailing Whitespaces

2002-10-31 Thread Carl Jolley
On Wed, 30 Oct 2002, [iso-8859-1] Burak Gürsoy wrote: $string =cat and dog ; $string =~ s,^\s+(.+?)\s+$,$1,; print $string; -Original Message- From: [EMAIL PROTECTED] [mailto:perl-win32-users-admin;listserv.ActiveState.com]On Behalf Of Stephens, Wes (N-Sybase) Sent:

[ANN] Win32::Daemon::Simple 0.1.0

2002-10-31 Thread Jenda Krynicky
I've just uploaded a new module to my pages at http://Jenda.Krynicky.cz It should help you create Windows services. If your service only needs to wake up once every N minutes all you need is to tell Win32::Daemon::Simple how to name it, what account to install it under, what parameters you