Re: removing lines of text from a file?

2001-01-25 Thread Shawn
Yes, you are correct, replace 'unless ($line = $name)' with 'unless ($line eq "$name\n")'... That's what I get for not testing it before I posted... Sorry about that Lee and list. Shawn - Original Message - From: "Joerg Plate" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, J

RE: cookie problems

2001-01-25 Thread Kirkup, Steve
#!/usr/bin/perl -w use strict; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); my $current_time; $current_time = localtime(); ## Since you never set this cookie it is not worth anything and is being removed ## my $cookievalue = cookie( -NAME => "TestCookie" ); my $cookie = c

Re: removing lines of text from a file?

2001-01-25 Thread Joerg Plate
>unless ($line = $name) { # name being the one you want to take out = is for assignment... use "eq" for strings... and $name needs an "\n", too... ___ ActivePerl mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/activep

Re: Generating a Make file

2001-01-25 Thread Joerg Plate
$mkfile = "Makefile"; $package = "com.microgeneral.ngs.vls.parser"; # get the Java source files (IMHO better than `dir/b` opendir(D,".") || die "no current dir: $!\n"; @files = grep { /.java$/ } readdir(D); closedir(D); # write the makefile open(MAKE, "+>>" . $mkfile) || die "Cant open filename

cookie problems

2001-01-25 Thread Katherine Richmond
Hi everyone, I'm trying to learn how to write and retrieve cookies. I haven't been able to figure out how to save a cookie based on the user's name. I can save and retrieve a constant cookie, but when I try to use a variable, the program will not compile. This must be a simple task, but I ca

Generating a Make file

2001-01-25 Thread Wesley North
Hello group, I've been trying all day long to get this script to work right, and so far it completes but not in the correct format. Basically we are using perl to generate a certain make file format. It should produce the following output: # DO NOT EDIT - This is a generated make file PACKAGE =

Re: removing lines of text from a file?

2001-01-25 Thread Shawn
open (FILE, "$file"); while ($line = ) { unless ($line = $name) { # name being the one you want to take out $new_file .= $line; } } close (FILE); open (FILE, "$file"); print FILE $new_file; close (FILE); Shawn - Original Message - From: "Lee Melville" <[EMAIL PROTECT

removing lines of text from a file?

2001-01-25 Thread Lee Melville
Hi, I have a text file that contains names, there is one name on each line ie;- -- file.txt - john jack simon frank EOF What is the easiest way of locating a name and removing the entire line that its on (so there leaves no blank lines). thanx lee

RE: Create Excel File w/o OLE (JDiggans@genelogic.com)

2001-01-25 Thread Patrick Surry
Another approach might be to output Office-style XML/HTML to specify the page. This allows full control over formatting, formulae, multi-sheets, graphs etc, and can be loaded directly into Excel, but without having to write directly in binary format. See link below for docs. I also attach a qui

RE: Win32::OLE syntax

2001-01-25 Thread Goodier, Colin R
Thanks, I think I've got it sorted now. :-) Colin > -Original Message- > From: Lynch, Dennis [SMTP:[EMAIL PROTECTED]] > Sent: 25 January 2001 18:09 > To: '[EMAIL PROTECTED]' > Subject: RE: Win32::OLE syntax > > "Goodier, Colin R" <[EMAIL PROTECTED]> wrote: > > Can anybody tell

RE: Win32::OLE syntax

2001-01-25 Thread Lynch, Dennis
"Goodier, Colin R" <[EMAIL PROTECTED]> wrote: Can anybody tell me the Win32::OLE syntax for the following MS Word macro code? With ActiveDocument.PageSetup .Orientation = wdOrientPortrait .LeftMargin = CentimetersToPoints(1) .RightMargin = CentimetersToPoints(1) End With

RE: ActivePerl digest, Vol 1 #285 - re: message 12

2001-01-25 Thread Christopher Humphries
I use this: e.g. use lib '/dirname/dirname2'; See the documentation for "lib" in the ActiveState HTML pages. Also see Chapter 12 of the Perl Cookbook (O'Reilly ISBN 1-56592-243-3). Chris Humphries. Message: 12 Date: Thu, 25 Jan 2001 12:18:44 +0100 (CET) From: <[EMAIL PROTECTED]> Subj