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
#!/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
>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
$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
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
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 =
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
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
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
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
"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
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
12 matches
Mail list logo