[11940] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 5541 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun May 2 08:07:32 1999

Date: Sun, 2 May 99 05:01:26 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 2 May 1999     Volume: 8 Number: 5541

Today's topics:
        How to get the date of a file <peter.olausson@hexmaster.com>
    Re: How to get the date of a file <tchrist@mox.perl.com>
    Re: How to get the date of a file <gellyfish@gellyfish.com>
    Re: localtime problems... <jbc@shell2.la.best.com>
    Re: localtime problems... (Larry Rosler)
    Re: localtime problems... <tchrist@mox.perl.com>
    Re: Newsfeed and Local Weather <tchrist@mox.perl.com>
    Re: Perl Editors On Win32 <bobnjudy@sierranetonthedottedline.net>
    Re: Perl Editors On Win32 (Brett Tabke)
    Re: Perl Editors On Win32 (Sam Holden)
    Re: Possible to modify gif/jpeg images with Perl?? <peter.olausson@hexmaster.com>
    Re: Possible to modify gif/jpeg images with Perl?? <eichner@gmx.de>
    Re: Possible to modify gif/jpeg images with Perl?? <eichner@gmx.de>
    Re: Q: Getting sendmail to work <aneely@odyssey.on.ca>
    Re: single quotation " erases REST OF TEXT <crstlblu@NOSPAMplanet.eon.net>
    Re: single quotation " erases REST OF TEXT (Sam Holden)
    Re: unos problemitas (Bart Lateur)
        Where is HeaderParser.pm? <huymle@gis.net>
    Re: Where is HeaderParser.pm? (Jim Britain)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 02 May 1999 11:30:19 +0200
From: Peter Olausson <peter.olausson@hexmaster.com>
Subject: How to get the date of a file
Message-Id: <372C1B2B.A0F97B85@hexmaster.com>

Isn't there a way to get a full directory from readdir(), with permissions,
dates, etc? Or a filetest like -M which doesn't return the modification age but
the modification date & time?


/Peter, www.Hexmaster.com


------------------------------

Date: 2 May 1999 03:57:40 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to get the date of a file
Message-Id: <372c2194@cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Peter Olausson <peter.olausson@hexmaster.com> writes:
:Isn't there a way to get a full directory from readdir(), with permissions,
:dates, etc? Or a filetest like -M which doesn't return the modification age but
:the modification date & time?

Go to http://language.perl.com/ppt/src/ls/index.html and look at the implementations
of ls that we have there.

And read this venerable code.

--tom

#!/usr/bin/perl
#
# Last edited: Mon Oct  5 11:48:02 1992 by Tim Wilson
# $Id: stat,v 1.1 1992/10/05 10:53:13 tdw Exp $
#
# Stat(2) files and print results.
#
# Usage: stat [-?] [-l] [-n] [-h] [--] files...
#
#  -l: use lstat(2) instead of stat(2)
#  -n: print output in numeric format (instead of readable format)
#  -h: if in numeric format, also print header line
#  -?: print help message
#  --: remaining arguments are file names
#
######################################################################
#
# Copyright (C) 1992 T D Wilson.  All rights reserved.
#
# Permission to copy without fee all or part of this material is
# granted provided that the copies are not made or distributed for
# direct commercial advantage, the copyright notice and the title and
# date appear, and notice is given that copying is by permission of
# the author.  To copy otherwise, or to republish, requires specific
# permission.
#
# T D Wilson makes no representations about the suitability of this
# software for any purpose.  It is provided "as is" without express or
# implied warranty.
#
######################################################################
#
# Modification summary:
#   5 Oct 1992	Tim Wilson	Altered comments; posted to
#				alt.sources.  Revision 1.1.
#  11 Jul 1991	Tim Wilson	Created.
#
# Tim Wilson, University of Cambridge Computer Laboratory, UK.
# tdw@cl.cam.ac.uk
#

sub usage {
	die "Usage: $progname [-l] [-n] [-h] [--] files...\n";
}

sub Lstat {
    ($st_dev,$st_ino,$st_mode,$st_nlink,$st_uid,$st_gid,$st_rdev,$st_size,
	$st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks) = lstat(shift(@_));
}

require "stat.pl";
require "ctime.pl";

######################################################################
#
# p_perm -- Return part permissions symbolically
#
#  perm:	Permissions.  Only the low three bits are significant
#  extra:	Extra bit to be encoded with execute (suid, sgid, sticky)
#  c:		Character to be used instead of `x' (`s' or `t')
#
# Returns -- three character string
#
# Side effects -- Output
#
######################################################################

sub p_perm {
	local ($perm,$extra,$c) = @_;
	local ($lower,$upper) = ($c, $c);
	local ($result);
	$lower =~ tr/ST/st/; # Guaranteed lower case `s' or `t'
	$upper =~ tr/st/ST/; # Guaranteed upper case `S' or `T'

	$result = ($perm & 04) ? "r" : "-";
	$result .= ($perm & 02) ? "w" : "-";
	# Want 2D array; do index arithmetic ourselves
	$result .= ("-", "x", $upper, $lower)[!!$extra * 2 + ($perm & 01)];
}


######################################################################
#
# p_mode -- Return symbolic $st_mode (and/or memorized stat structure)
#
#  Arguments are global variables.  Ahem!
#
# Returns -- ten character string
#
# Side effects -- Output
#
######################################################################

sub p_mode {
	local ($result);
	# First letter according to type of file
	TYPE: {
		-p _ && do {$result = "p"; last TYPE;};
		-c _ && do {$result = "c"; last TYPE;};
		-d _ && do {$result = "d"; last TYPE;};
		-b _ && do {$result = "b"; last TYPE;};
		-l $file && do {$result = "l"; last TYPE;};# lstat problems
		-f _ && do {$result = "-"; last TYPE;};
		-S _ && do {$result = "s"; last TYPE;};
		warn ("unknown type of file, mode %#o\n", $st_mode);
		$result = "?";
	}

	$result .= &p_perm ($st_mode >> 6, -u _, "s");	# User
	$result .= &p_perm ($st_mode >> 3, -g _, "s");	# Group
	$result .= &p_perm ($st_mode >> 0, -k _, "t");	# Others
}


######################################################################
#
# uid, gid -- Convert numeric uid, gid to symbolic
#
#  arg:		numeric id
#
# Returns -- Name associated with id if found, else number
#
# Side effects -- Accesses /etc/passwd or replacement
#
######################################################################

sub uid {
	local ($uid) = @_;
	$uid{$uid} = getpwuid($uid)
	    unless defined $uid{$uid};
	$uid{$uid} = "#$uid" 
	    unless defined $uid{$uid};
	$uid{$uid};
}

sub gid {
	local ($gid) = @_;
	$gid{$gid} = getgrgid($gid)
	    unless defined $gid{$gid};
	$gid{$gid} = "#$gid" 
	    unless defined $gid{$gid};
	$gid{$gid};
}


######################################################################
#
# verbstat -- Print $st_* variable (and/or remembered stat structure)
#             in multiline verbose format
#
#  Arguments are global variables.  Ahem!
#
# Returns -- nothing
#
# Side effects -- Output
#
######################################################################

sub verbstat {
	local ($atime, $mtime, $ctime) 
		= (&ctime ($st_atime), &ctime ($st_mtime), &ctime ($st_ctime));
	local ($mode) = &p_mode;

	printf ("%s\n", $file);
	printf ("\tdevice\t\t%#x\n", $st_dev);
	printf ("\tinode\t\t%d\t\t%#x\n", $st_ino, $st_ino);
	printf ("\tmode\t\t%s\t%#o\n", &p_mode, $st_mode);
	printf ("\tnlink\t\t%d\n", $st_nlink);
	printf ("\towner\t\t%s\n", &uid ($st_uid));
	printf ("\tgroup\t\t%s\n", &gid ($st_gid));
	printf ("\trdev\t\t%d\n", $st_rdev);
	printf ("\tsize\t\t%d\n", $st_size);
	chop ($atime);
	chop ($mtime);
	chop ($ctime);
	printf ("\tatime\t\t%d %s\n\tmtime\t\t%d %s\n\tctime\t\t%d %s\n",
		$st_atime, $atime, $st_mtime, $mtime, $st_ctime, $ctime);
	printf ("\tblksize\t\t%d\n", $st_blksize);
	printf ("\tblocks\t\t%d\n", $st_blocks);
}


######################################################################
# Main program
######################################################################

$_ = $0;
$progname = m|.*/([^/]+)| ? $1 : $_;


$opt_lstat = 0;				# If true use lstat not stat
$opt_header = 0;			# Add header line
$opt_numeric = 0;			# One-line numeric format

# No switch clustering with this simple parser

SWITCH:
while ($_ = shift) {
	/^-\?/ && &usage;			# stat -? ... gives usage
	/^--$/ && last SWITCH;			# -- terminates switches
	/^-l$/ && ($opt_lstat = 1, next SWITCH);
	/^-h$/ && ($opt_header = 1, next SWITCH);
	/^-n$/ && ($opt_numeric = 1, next SWITCH);

	unshift (ARGV, $_);		# We are looking at the first file
	last SWITCH;
}

($#ARGV < $[) && &usage;		# Must have at least one arg


# Print out header if requested and numeric format

$opt_numeric && $opt_header && print "dev ino mode nlink uid gid rdev size atime mtime ctime blksize blocks\n";


# Stat remaining args and print result

foreach $file (@ARGV) {
	if ($opt_lstat) {
		&Lstat ($file);
	} else {
		&Stat ($file);
	}

	if (defined ($st_dev)) {
		if ($opt_numeric) {
			#       fn  dev ino md  nl ud gd rdv siz atm mtm ctm bks nbk
			printf "%s %#x %#x %#o %d %d %d %#x %ld %ld %ld %ld %d %d\n",
			$file,
			$st_dev, $st_ino, $st_mode, $st_nlink, 
			$st_uid, $st_gid,
			$st_rdev, $st_size, 
			$st_atime, $st_mtime, $st_ctime,
			$st_blksize, $st_blocks;
		} else {
			&verbstat;
		}
	} else {
		warn "$0: can't ", 
		$opt_lstat ? "lstat" : "stat",
		" $file: $!\n";
	}
}

# End of stat
-- 
    if (instr(buf,sys_errlist[errno]))  /* you don't see this */
        --Larry Wall in eval.c from the 4.0 perl source code


------------------------------

Date: 2 May 1999 10:40:23 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to get the date of a file
Message-Id: <7gha2n$an$1@gellyfish.btinternet.com>

On Sun, 02 May 1999 11:30:19 +0200 Peter Olausson wrote:
> Isn't there a way to get a full directory from readdir(), with permissions,
> dates, etc? Or a filetest like -M which doesn't return the modification age but
> the modification date & time?
> 

I think you want to use stat().

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: 02 May 1999 07:42:05 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Re: localtime problems...
Message-Id: <372c01cd$0$214@nntp1.ba.best.com>

dave <webmaster@geeks404.com> wrote:
> thank you! that's exactly what was the problem. but is there any way to get
> the full year i.e. 1999 vs. 99?

I could be cruel and suggest you concatenate it with the string '19',
but I'm sure there'd be some kind of horrible karmic balancing that
would take place before too long...

No, you should add 1900 to it:

$year = 1900 + $year;

Entering 'perldoc -f localtime' in the shell will give you some useful
hints on why this is the preferred approach.

-- 
John Callender
jbc@west.net
http://www.west.net/~jbc/


------------------------------

Date: Sun, 2 May 1999 01:03:45 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: localtime problems...
Message-Id: <MPG.1195a6b81cf5b980989991@nntp.hpl.hp.com>

In article <7ggqqq$5kic$1@newssvr04-int.news.prodigy.com> on Sun, 2 May 
1999 02:20:27 -0400, dave <webmaster@geeks404.com> says...
> thank you! that's exactly what was the problem. but is there any way to get
> the full year i.e. 1999 vs. 99?

The way to get the full year is to read the documentation of the 
function.

perldoc -f localtime

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 2 May 1999 03:53:30 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: localtime problems...
Message-Id: <372c209a@cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    "dave" <webmaster@geeks404.com> writes:
:thank you! that's exactly what was the problem. but is there any way to get
:the full year i.e. 1999 vs. 99?

Yes.  

YOU READ THE FRICKING MANPAGE.

    =item localtime EXPR

    Converts a time as returned by the time function to a 9-element list
    with the time analyzed for the local time zone.  Typically used as
    follows:

	#  0    1    2     3     4    5     6     7     8
	($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
						    localtime(time);

    All list elements are numeric, and come straight out of a struct tm.
    In particular this means that C<$mon> has the range C<0..11> and
    C<$wday> has the range C<0..6> with sunday as day C<0>.  Also,
    C<$year> is the number of years since 1900, that is, C<$year>
    is C<123> in year 2023, and I<not> simply the last two digits of
    the year.  If you assume it is, then you create non-Y2K-compliant
    programs--and you wouldn't want to do that, would you?

    If EXPR is omitted, uses the current time (C<localtime(time)>).

    In scalar context, returns the ctime(3) value:

	$now_string = localtime;  # e.g., "Thu Oct 13 04:54:34 1994"

    This scalar value is B<not> locale dependent, see L<perllocale>,
    but instead a Perl builtin.  Also see the C<Time::Local> module,
    and the strftime(3) and mktime(3) function available via the POSIX
    module.  To get somewhat similar but locale dependent date strings,
    set up your locale environment variables appropriately (please see
    L<perllocale>) and try for example:

	use POSIX qw(strftime);
	$now_string = strftime "%a %b %e %H:%M:%S %Y", localtime;

    Note that the C<%a> and C<%b>, the short forms of the day of the week
    and the month of the year, may not necessarily be three characters
    wide.

--tom
-- 
		"Qvid me anxivs svm?"


------------------------------

Date: 2 May 1999 03:46:09 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Newsfeed and Local Weather
Message-Id: <372c1ee1@cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Uri Guttman <uri@sysarch.com> writes:
:so if you want to more easily read my posts, use larry's filter!

ifyouwontputindoublespacestoseparatesentencesandyouwontputincapitals
toindicatetheirstartitisquiteabithardertoparsethanwedeserve.

--tom
-- 
It's a damn poor mind that can only think of one way to spell a word.
                --Andrew Jackson


------------------------------

Date: Sun, 02 May 1999 00:54:00 -0700
From: Bob Jackson <bobnjudy@sierranetonthedottedline.net>
Subject: Re: Perl Editors On Win32
Message-Id: <372C0497.175503F5@sierranetonthedottedline.net>

Ian Taite wrote:

> Anyone know of a free full screen editor running under Windows NT
> that's Perl aware? i.e. colour codes the program source
> Ian.

Try http://www.petes-place.com/ for a thing called 'CodeMagic'
I'm _very new to this myself, so I can't advise on how good it
is vs others, but it meets your 'colour codes the program source'
requirement and it's free.

Good luck

--
Bob Jackson    bobnjudy@.sierranet.onthedottedlinenet

"These are indeed harsh times for the dim." - jott@snugbug.cts.com
To reply, cut on the dotted line




------------------------------

Date: Sun, 02 May 1999 01:36:01 -0400
From: invalid-see-sig@nope.joefarmer.com (Brett Tabke)
Subject: Re: Perl Editors On Win32
Message-Id: <BR+K3k+hDEEP092yn@joefarmer.com>

Bob Jackson <bobnjudy@sierranetonthedottedline.net> wrote:
>Ian Taite wrote:
>
>> Anyone know of a free full screen editor running under Windows NT
>> that's Perl aware? i.e. colour codes the program source
>> Ian.

Boxer for DOS. http://www.boxersoftware.com
Its the most powerful code editor I've ever used on any platform,
there is nothing better.

Brett howdy _at- netlane.com



------------------------------

Date: 2 May 1999 11:06:14 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Perl Editors On Win32
Message-Id: <slrn7iocd5.apg.sholden@pgrad.cs.usyd.edu.au>

On Sun, 02 May 1999 01:36:01 -0400, Brett Tabke wrote:
>Bob Jackson <bobnjudy@sierranetonthedottedline.net> wrote:
>>Ian Taite wrote:
>>
>>> Anyone know of a free full screen editor running under Windows NT
>>> that's Perl aware? i.e. colour codes the program source
>>> Ian.
>
>Boxer for DOS. http://www.boxersoftware.com

Shareware does not qualify as free to honest people. 

>Its the most powerful code editor I've ever used on any platform,
>there is nothing better.

Search and replace based on wild cards instead of regular expressions would
place said editor into the 'complete crap' box for 'real programmers'.

Editors that can 'edit files as large as approximately 220K in size' places
said editor into the 'complete crap' box for 'real programmers'.

-- 
Sam

Can you sum up plan 9 in layman's terms? It does everything Unix does
only less reliably.
	--Ken Thompson


------------------------------

Date: Sun, 02 May 1999 11:36:17 +0200
From: Peter Olausson <peter.olausson@hexmaster.com>
Subject: Re: Possible to modify gif/jpeg images with Perl??
Message-Id: <372C1C91.71352B64@hexmaster.com>

darkstar wrote:
> i want to modify a gif or a jpg image with perl. I must resize
> an existing image. Is this possible with perl or have you any ideas?

There is a module called GD that you can manipulate GIF-images with;

 http://www.boutell.com/gd/gd.html


/Peter, www.Hexmaster.com


------------------------------

Date: Sun, 2 May 1999 02:32:07 +0100
From: "darkstar" <eichner@gmx.de>
Subject: Re: Possible to modify gif/jpeg images with Perl??
Message-Id: <7ghc8k$gv8$1@black.news.nacamar.net>


Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
7gg0ge$3bt$1@gellyfish.btinternet.com...
>On Sat, 1 May 1999 14:17:07 +0100 darkstar wrote:
>> i want to modify a gif or a jpg image with perl. I must resize an
existing
>> image. Is this possible with perl or have you any ideas?
>>
>


>I would go with the Image::Magick module available from CPAN.
Where can I download this module?


>
>/J\
>--
>Jonathan Stowe <jns@gellyfish.com>
>Some of your questions answered:
><URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
>Hastings:
<URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>




------------------------------

Date: Sun, 2 May 1999 02:37:04 +0100
From: "darkstar" <eichner@gmx.de>
Subject: Re: Possible to modify gif/jpeg images with Perl??
Message-Id: <7ghc8l$gv8$2@black.news.nacamar.net>


Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
7gg0ge$3bt$1@gellyfish.btinternet.com...
>On Sat, 1 May 1999 14:17:07 +0100 darkstar wrote:
>> i want to modify a gif or a jpg image with perl. I must resize an
existing
>> image. Is this possible with perl or have you any ideas?
>>
>

>I would go with the Image::Magick module available from CPAN.
Where can I get this module?

>
>/J\
>--
>Jonathan Stowe <jns@gellyfish.com>
>Some of your questions answered:
><URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
>Hastings:
<URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>




------------------------------

Date: Sun, 02 May 1999 06:02:18 -0400
From: Amer Neely <aneely@odyssey.on.ca>
Subject: Re: Q: Getting sendmail to work
Message-Id: <372C22A9.8C10BAFD@odyssey.on.ca>

Amer Neely wrote:

> Hi all,
> I'm having a problem trying to call sendmail from an otherwise working
> Perl script. I have confirmed the path to sendmail. I've read the Perl /
> CGI Programming FAQ, where in fact this question (4.1) is dealt with.
> Problem is it doesn't seem to work for me. The code snippet I have:
>
> #!/usr/bin/perl
> print "Content-type: text/html\n\n";
>
> $mailfrom="aneely\@odyssey.on.ca";
> $mailto="aneely\@odyssey.on.ca";
> $mailsubject="Another Site Survey";
> $mailbody="I sent this via a Perl script calling sendmail.\n";
> open(SENDMAIL, "| /usr/lib/sendmail -t -n");
> print SENDMAIL "From: $mailfrom\n";
> print SENDMAIL "To: $mailto\n";
> print SENDMAIL "Reply-To: $mailfrom\n";
> print SENDMAIL "Subject: $mailsubject\n";
> print SENDMAIL "$mailbody";
> close (SENDMAIL);
>
> I'd rather try and roll this one myself as opposed to using a Perl
> module. I can't seem to get cgi.pm or any other modules to work either
> under Win95. This snippet is part of a working script to generate a
> Thank You HTML page which works fine. I'd like to notify myself (or
> someone else) depending on a condition being met.
>
> Any help with the sendmail is greatly appreciated. Thanks.

More information available. I get the message:

/etc/sendmail.cf: line 55: fileclass: cannot open /etc/mail/sendmail.cw:
Group writable directory

printed to the HTML page. Looks like a question for my ISP. Sorry.
--
Amer Neely aneely@odyssey.on.ca
Certified Internet Webmaster Designer
Softouch Information Services: http://www.softouch.on.ca/
Research Central: http://www.execulink.com/~aneely/
Member: International Webmasters Association: http://iwanet.org
Member: Association of Web Professionals: http://www.a-w-p.org




------------------------------

Date: Sun, 02 May 1999 10:52:08 GMT
From: SOLVED <crstlblu@NOSPAMplanet.eon.net>
Subject: Re: single quotation " erases REST OF TEXT
Message-Id: <371dfde9.475610@news.planet.eon.net>

On 30 Apr 1999 09:10:37 -0600, Daniel Grisinger <dgris@moiraine.dimensional.com>
>Yes.  For your current application there are different
>rules.  I'm going to step through this slowly, hopefully
>you'll see where your problem is.
snip
>Daniel Grisinger          dgris@moiraine.dimensional.com

	thanks Daniel for pointing me to my final solution!
	and to everyone else who tried to get through  :)
to summarize for anyone lured into this thread:

	a TEXT FIELD typed in, in a browser submitted is 
		1) escaped on way to next scripts 'QUERY_STRING'
		2) UNescaped during parsing from the 'QUERY_STRING'
AUTOMATICALLY!

	a HIDDEN FIELD's $value generated in a script submitted:
		1) IS NOT ESCAPED AUTOMATICALLY on way TO next script
		2) probably IS UNescaped normally during parsing from      
                               'QUERY_STRING'

SOLUTION!   the $value must be:
	$value =~ s/"/&quot;/g;
just BEFORE it is plunked into a form HIDDEN field, to COMPENSATE for this
shortcoming!  It works, it works, it works, it works!
God Bless,
Wayne.



------------------------------

Date: 2 May 1999 11:32:32 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: single quotation " erases REST OF TEXT
Message-Id: <slrn7ioduf.apg.sholden@pgrad.cs.usyd.edu.au>

On Sun, 02 May 1999 10:52:08 GMT, SOLVED <crstlblu@NOSPAMplanet.eon.net> wrote:

<snip explanation that everyone had already typed in themselves and then been
completely ignored by the poster except to say that they were wrong because
that couldn't be the problem, because the poster knows best>
>
>SOLUTION!   the $value must be:
>	$value =~ s/"/&quot;/g;

You mean exactly the code that Tad and everyone else posted.

You mean exactly the code that you said didn't work when you tried it.

Congratulations for getting yourself *plonked* by amost everyone in this
newsgroup who might be able to help you with some future problem you
may have.

Here are some selected quotes for those of you who have missed this humourous
thread...

q{
>      $value =~ s/"/&quot;/g;   # escape double quotes as REQUIRED
>                                # by the HTML specification!!!
>    Tad McClellan

        thanks for your suggestion, Tad, however it doesn't work!
}
 - <371bb76e.1617532@news.planet.eon.net>

"it's NOT A MATTER OF HTML friend,  the PROOF is that in the FIRST cgi
script..." - <371bb76e.1617532@news.planet.eon.net>

'escaping BEFORE entering the $value into the hidden field would be
insane' - <371bb76e.1617532@news.planet.eon.net> 

'THE PRECISE SAME HTML SPECIFICATIONS ARE BEING USED IN BOTH APPLICATIONS'
 - <371bb76e.1617532@news.planet.eon.net>

q{
>       $content=~ s/"/&quot;/g;
>       Bart.

        thanks Bart, unfortunately IT DON'T WORK either,  :(
} - <371c8fb3.614507@news.planet.eon.net>

q{
Don't do ANY HTML codeing in the scipts - to keep the flamers away -
don't worry about trying to "print" to the browser any values this is
100% strictly PERL programming!
} - <371c8fb3.614507@news.planet.eon.net>

'I found a bug, and everybody refuses to acknowledge it!'
 - <371cc54b.1340315@news.planet.eon.net>

'i still don't see why everyone thinks this is a HTML problem????'
 - <371b1617.1544326@news.planet.eon.net>

-- 
Sam

PC's are backwards ... throw them out! Linux is ok though.
	--Rob Pike (on the subject of CR/LF etc)


------------------------------

Date: Sun, 02 May 1999 08:21:39 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: unos problemitas
Message-Id: <372e0279.1507251@news.skynet.be>

Tom Christiansen wrote:

>:"No problemo!" is pure Simpson-speak.  
>
>Hence my complaint.  It's not real.  Now and then I flail
>out at words ignorantly mutilated.  This is one such case.

That how languages develop.

Otherwise, we'd all be speaking Latin, Greek, or Celtic. Whatever.

	Bart.


------------------------------

Date: Sun, 02 May 1999 06:41:18 -0400
From: Huy Le <huymle@gis.net>
Subject: Where is HeaderParser.pm?
Message-Id: <372C2BCE.2EFC22C9@gis.net>

What Perl module contains HeaderParser.pm and where can I find it?
Thanks for you help.

Huy



------------------------------

Date: Sun, 02 May 1999 11:06:03 GMT
From: jbritain@home.com (Jim Britain)
Subject: Re: Where is HeaderParser.pm?
Message-Id: <372c3135.2137560@news>

On Sun, 02 May 1999 06:41:18 -0400, Huy Le <huymle@gis.net> wrote:

>What Perl module contains HeaderParser.pm and where can I find it?
>Thanks for you help.
>
>Huy
smaster 1# perl -MCPAN -e shell

cpan shell -- CPAN exploration and modules installation (v1.48)
ReadLine support enabled

cpan> i /HeaderParser/
No objects found of any type for argument /HeaderParser/

cpan> i /Header/
Distribution    ANDK/Apache-correct_headers-1.15.tar.gz
Distribution    J/JN/JNEYSTADT/http-headers-useragent-1.00.tar.gz
Module          Apache::DumpHeaders
(DOUGM/Apache-Perl-contrib-022398.tar.gz)
Module          Apache::correct_headers
(ANDK/Apache-correct_headers-1.15.tar.gz)
Module          Audio::Wav::Write::Header
(N/NP/NPESKETT/Audio-Wav-0.01.tar.gz)
Module          Games::Rezrov::ZHeader
(E/ED/EDMONSON/Games-Rezrov-0.16.tar.gz)
Module          HTTP::Header::ETag (GAAS/libwww-perl-5.42.tar.gz)
Module          HTTP::Headers   (GAAS/libwww-perl-5.42.tar.gz)
Module          HTTP::Headers::Auth (GAAS/libwww-perl-5.42.tar.gz)
Module          HTTP::Headers::UserAgent
(J/JN/JNEYSTADT/http-headers-useragent-1.00.tar.gz)
Module          HTTP::Headers::Util (GAAS/libwww-perl-5.42.tar.gz)
Module          Mail::Header    (GBARR/MailTools-1.13.tar.gz)
Module          Net::DNS::Header (MFUHR/Net-DNS-0.12.tar.gz)
Module          Net::Hotline::Protocol::Header
(J/JS/JSIRACUSA/Net-Hotline-0.73.tar.gz)

cpan> i /Parser/
Distribution    BRADAPP/PodParser-1.081.tar.gz
Distribution    C/CO/COOPERCL/XML-Parser-2.23.tar.gz
Distribution    GAAS/HTML-Parser-2.22.tar.gz
Distribution    PVERD/RTF-Parser-1.05.tar.gz
Distribution    PVERD/RTF-Parser-1.06.tar.gz
Distribution    R/RB/RBERJON/CSS-Parser-0.05.tar.gz
Module          AstDumpParser   (SRIRAM/examples.tar.gz)
Module          CSS::Parser     (R/RB/RBERJON/CSS-Parser-0.05.tar.gz)
Module          CSSPrinter      (R/RB/RBERJON/CSS-Parser-0.05.tar.gz)
Module          DailyUpdate::Parser
(D/DC/DCOPPIT/DailyUpdate-7.00.tar.gz)
Module          GetWeb::Parser  (RHNELSON/GetWeb-1.11.tar.gz)
Module          HTML::Entities  (GAAS/HTML-Parser-2.22.tar.gz)
Module          HTML::Filter    (GAAS/HTML-Parser-2.22.tar.gz)
Module          HTML::HeadParser (GAAS/HTML-Parser-2.22.tar.gz)
Module          HTML::LinkExtor (GAAS/HTML-Parser-2.22.tar.gz)
Module          HTML::Mason::Parser
(J/JS/JSWARTZ/HTML-Mason-0.4.tar.gz)
Module          HTML::Parser    (GAAS/HTML-Parser-2.22.tar.gz)
Module          HTML::TokeParser (GAAS/HTML-Parser-2.22.tar.gz)
Module          MIME::Parser    (ERYQ/MIME-tools-4.122.tar.gz)
Module          MIME::ParserBase (ERYQ/MIME-tools-4.122.tar.gz)
Module          Mail::IspMailGate::Parser
(JWIED/Mail-IspMailGate-1.003.tar.gz)
Module          PDL::Pod::Parser (KGB/PDL-2.0.tar.gz)
Module          POP::POX_parser (B/BH/BHOLZMAN/pop-0.05.tar.gz)
Module          POP::Schema_parser (B/BH/BHOLZMAN/pop-0.05.tar.gz)
Module          Parser          (HVDS/Codex-0.01.tar.gz)
Module          Pod::Checker    (BRADAPP/PodParser-1.081.tar.gz)
Module          Pod::InputObjects (BRADAPP/PodParser-1.081.tar.gz)
Module          Pod::Parser     (BRADAPP/PodParser-1.081.tar.gz)
Module          Pod::PlainText  (BRADAPP/PodParser-1.081.tar.gz)
Module          Pod::Select     (BRADAPP/PodParser-1.081.tar.gz)
Module          Pod::Usage      (BRADAPP/PodParser-1.081.tar.gz)
Module          RPCLParser      (JAKE/perlrpcgen-0.71a.tar.gz)
Module          RTF::Charsets   (PVERD/RTF-Parser-1.06.tar.gz)
Module          RTF::Config     (PVERD/RTF-Parser-1.06.tar.gz)
Module          RTF::Control    (PVERD/RTF-Parser-1.06.tar.gz)
Module          RTF::HTML::Converter (PVERD/RTF-Parser-1.06.tar.gz)
Module          RTF::HTML::Output (PVERD/RTF-Parser-1.05.tar.gz)
Module          RTF::Parser     (PVERD/RTF-Parser-1.06.tar.gz)
Module          Reference_Parser
(H/HL/HLHAMILT/Getopt-ExPar-0.01.tar.gz)
Module          SGML::Parser    (EHOOD/perlSGML.1997Sep18.tar.gz)
Module          SGML::StripParser (EHOOD/perlSGML.1997Sep18.tar.gz)
Module          SchemaParser    (SRIRAM/examples.tar.gz)
Module          TemplateParser  (SRIRAM/examples.tar.gz)
Module          Text::Parser    (Contact Author Pat Martin
<pat@bronco.advance.com>)
Module          VRML::Parser    (LUKKA/FreeWRL-0.14.tar.gz)
Module          X500::DN::Parser (R/RS/RSAVAGE/X500-DN-1.11.tgz)
Module          XML::Parser     (C/CO/COOPERCL/XML-Parser-2.23.tar.gz)
Module          XML::Parser::Expat
(C/CO/COOPERCL/XML-Parser-2.23.tar.gz)
Module          XML::Parser::Grove (KMACLEOD/XML-Grove-0.05.tar.gz)
Module          XML::XQL::Parser (E/EN/ENNO/XML-XQL-0.60.tar.gz)

cpan>



------------------------------

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 5541
**************************************

home help back first fref pref prev next nref lref last post