[16151] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3563 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 10 16:22:57 2000

Date: Mon, 10 Jul 2000 13:22:41 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <963260561-v9-i3563@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 10 Jul 2000     Volume: 9 Number: 3563

Today's topics:
        Error message: Unrecognized character \x00 at script.pl (JohnCraycraft)
    Re: Error message: Unrecognized character \x00 at scrip <bwalton@rochester.rr.com>
    Re: Error message: Unrecognized character \x00 at scrip (David Efflandt)
    Re: Error message: Unrecognized character \x00 at scrip (Csaba Raduly)
    Re: Errors when running debugger <jsdNOjsSPAM@gamespot.com.invalid>
    Re: Errors when running debugger <gellyfish@gellyfish.com>
    Re: Examine A Standart Logfile (Abigail)
    Re: Examine A Standart Logfile (Abigail)
    Re: Examine A Standart Logfile <gellyfish@gellyfish.com>
        Executable? <cruz.d@worldnet.att.net>
    Re: Executable? <nnickee@nnickee.com>
    Re: Executable? (David H. Adler)
        Experienced PERL / CGI programmers needed <admin@wisecommunity.com>
    Re: Experienced PERL / CGI programmers needed (Michel Dalle)
    Re: Experienced PERL / CGI programmers needed (Tad McClellan)
    Re: Experienced PERL / CGI programmers needed (Michel Dalle)
        File Handle Data size limits timfi@my-deja.com
    Re: File Handle Data size limits <lauren_smith13@hotmail.com>
    Re: File Handle Data size limits <bwalton@rochester.rr.com>
        File ownership under Win32 <matthew.keeneNOmaSPAM@colesmyer.com.au.invalid>
        File Widget <deninet@deninet.com>
    Re: File Widget <care227@attglobal.net>
        Filehandle for a buffer (array) ? <sam_rui@yahoo.com>
    Re: Filehandle for a buffer (array) ? (Tad McClellan)
        Filter script and Apache genadi@my-deja.com
    Re: Filter script and Apache (jason)
        Filter script question <gmakhlin@atreuscorp.com>
        Flash and Perl ! <lightsphere@gmx.de>
    Re: Flash and Perl ! (Abigail)
    Re: Flash and Perl ! <Magic@mattnet.freeserve.co.uk>
    Re: Flash and Perl ! <s0218327@unix1.cc.ysu.edu>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 09 Jul 2000 01:32:17 GMT
From: johncraycraft@cs.com (JohnCraycraft)
Subject: Error message: Unrecognized character \x00 at script.plx line 1
Message-Id: <20000708213217.22931.00001745@ng-bg1.news.cs.com>

Installed ActiveState Win32 perl on a Windows 95 system this morning. 
script.pls contains: print("Hello, world\n");  When I type "perl script.pls"
(no quotes) in a command line the error message "Unrecognized character \x00 at
script.plx line 1" is displayed.  When I enter the same script on a command
line with the -e switch it works fine.  Any ideas what's wrong? 


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

Date: Sun, 09 Jul 2000 01:54:46 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Error message: Unrecognized character \x00 at script.plx line 1
Message-Id: <3967DBA9.CCC04B15@rochester.rr.com>

JohnCraycraft wrote:
> 
> Installed ActiveState Win32 perl on a Windows 95 system this morning.
> script.pls contains: print("Hello, world\n");  When I type "perl script.pls"
> (no quotes) in a command line the error message "Unrecognized character \x00 at
> script.plx line 1" is displayed.  When I enter the same script on a 
-----------^
You said it was .pls above??

> command
> line with the -e switch it works fine.  Any ideas what's wrong?

Did you use a genuine text editor to make your Perl source code file? 
Or something that generates binary files rather than text files, like
Word or Wordpad or something?  Try Notepad.  Then (after you recover
from the illness) get VIM.
-- 
Bob Walton


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

Date: 9 Jul 2000 09:20:29 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Error message: Unrecognized character \x00 at script.plx line 1
Message-Id: <slrn8mggui.s78.efflandt@efflandt.xnet.com>

On 09 Jul 2000 01:32:17 GMT, JohnCraycraft <johncraycraft@cs.com> wrote:
>Installed ActiveState Win32 perl on a Windows 95 system this morning. 
>script.pls contains: print("Hello, world\n");  When I type "perl script.pls"
>(no quotes) in a command line the error message "Unrecognized character \x00 at
>script.plx line 1" is displayed.  When I enter the same script on a command
>line with the -e switch it works fine.  Any ideas what's wrong? 

Sounds like a null character that marks end of DOS files.  When editing
scripts in Notepad you have to remember to hit enter after the last line
of the script or it may not execute that line.  Or at least so I hear.

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/



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

Date: 10 Jul 2000 12:29:31 GMT
From: csaba_r@my-deja.com (Csaba Raduly)
Subject: Re: Error message: Unrecognized character \x00 at script.plx line 1
Message-Id: <8F6D8053Aquuxi@194.203.134.200>

09 Jul 2000: A formal bug report was sent to Seti@Home, because the
following message originated from efflandt@xnet.com (David Efflandt)
was reported as containing signs of intelligence: 

>On 09 Jul 2000 01:32:17 GMT, JohnCraycraft <johncraycraft@cs.com>
>wrote: 
>>Installed ActiveState Win32 perl on a Windows 95 system this
>>morning. script.pls contains: print("Hello, world\n");  When I type
>>"perl script.pls" (no quotes) in a command line the error message
>>"Unrecognized character \x00 at script.plx line 1" is displayed. 
>>When I enter the same script on a command line with the -e switch
>>it works fine.  Any ideas what's wrong? 
>
>Sounds like a null character that marks end of DOS files.  

It does no such thing. A Ctrl-Z would do that, but that (apparently) 
doesn't apply here.
Maybe you have a genuine \x00 character in the file ? (Use a hexeditor 
to check)

-- 
Csaba Raduly, Software Developer (OS/2), Sophos Anti-Virus
mailto:csaba.raduly@sophos.com      http://www.sophos.com/
US Support +1 888 SOPHOS 9      UK Support +44 1235 559933
Life is complex, with real and imaginary parts.


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

Date: Mon, 03 Jul 2000 11:13:34 -0700
From: jsd <jsdNOjsSPAM@gamespot.com.invalid>
Subject: Re: Errors when running debugger
Message-Id: <04f1856e.b619c640@usw-ex0104-032.remarq.com>

pinkpanther1970@my-deja.com wrote:
>1. Value of construct can be "0"; test with defined()
>   at /wwwroot/my/account/myscript.pm line 65535.

without seeing the script, you're using defined() where you
should be using == or vice versa.

>2. "my" variable $num masks earlier declaration in same scope

this is easy.  you did

my $x;

somewhere, and somewhere later (but still within the same scope
level) you did

my $x;

again.  just remove the my from the second occurence.

>On another script it gives me:
>Can't locate object method "seqno" via package "Apache"
>at /usr/lib/perl5/i386-linux/5.004/CGI.pm line 263

This sounds like you need to reinstall the Apache.pm and/or
CGI.pm modules.

-jsd-


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

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com



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

Date: 4 Jul 2000 10:21:42 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Errors when running debugger
Message-Id: <8jsab6$e8n$1@orpheus.gellyfish.com>

On Mon, 03 Jul 2000 06:19:49 GMT pinkpanther1970@my-deja.com wrote:
> Hello,
> 
> I'm trying to get a perl script with modules to run on a webserver.
> When I run perl debugger I get the following two things:
> 1. Value of construct can be "0"; test with defined()
>    at /wwwroot/my/account/myscript.pm line 65535.

Old version of Perl - upgrade or do what it says.

You are doing something like :

      while($blah = <FILE>)
      {
        ...
      }

It wants you to do :

      while( defined $blah = <FILE> )
      {
        ...
      }    

> 2. "my" variable $num masks earlier declaration in same scope
> 

Well dont do that then.  This is cause by doing something like :

   my $foo = 'something';

   my $foo = 'something else';

In the same lexical scope - you should remove the second 'my' ...

> On another script it gives me:
> Can't locate object method "seqno" via package "Apache"
> at /usr/lib/perl5/i386-linux/5.004/CGI.pm line 263
> 

I dont know what to say about this - in the version of CGI.pm that I have
there is no attempt to access any object method 'seqno' anywhere - let alone
at line 263 ... Of course you will have an older version than I have I would
recommend that you upgrade (infact upgrading the Perl will do that as it
is part of the distribution).  It could conceivably also be caused by a
a misconfigured or misinstalled mod_perl - CGI.pm should do nothing with
the Apache module unless your program is running under mod_perl.

> Does anyone know how to avoid these errors?

Questions 1 & 3 upgrade your Perl, question 2 fix your program.

> With the first error I'm really confused. It says "line 65535" but the
> script isn't that long, is this a server problem?

No this is a teensy weensy little bug in Perl but you are going to upgrade
to the lastest version anyway so it wont worry you anymore.

> The second error I can find in the script, but I don't know how to fix
> it.

As I said remove the offending 'my' or introduce a new lexical scope -
whichever is more appropriate to your program.

> The third one also confuses me. How can I fix an error in CGI.pm that's
> located on the webserver? Or is this also caused by my script?
> I'm really a newbie at perl and I've searched all over the internet for
> weeks, but I haven't found any solution to these problems.
> If anyone can help, I'd appreciate it a lot.
> 
> Pink Panther
> 
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.
-- 
** This space reserved for venue sponsor for yapc::Europe **
              <http://www.yapc.org/Europe/> 


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

Date: 04 Jul 2000 00:13:00 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: Examine A Standart Logfile
Message-Id: <slrn8m2q42.59a.abigail@alexandra.delanet.com>

Markus Hediger (fjgfjgfj@askjfsafjkslfj.ch) wrote on MMCDXCVII September
MCMXCIII in <URL:news:395F6F4D.900BDE58@askjfsafjkslfj.ch>:
!! Hello!
!! 
!! Does anyone know the ultimative regular expression or algorithm to split a
!! single line from a standart logfile into its fields?

Why bother? There are already packages out there that do that for you.
Go to the CPAN!

!! A line looking like:
!! 
!! ad25-175.compuserve.com - - [02/Mar/1997:05:03:49 -0500]
!! "GET /selfhtml/tg.htm HTTP/1.0" 200 1788

That looks like a web log, not syslog! (What else than syslog could
you mean with "standard logifle"?)


Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


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

Date: 04 Jul 2000 00:15:27 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: Examine A Standart Logfile
Message-Id: <slrn8m2q8l.59a.abigail@alexandra.delanet.com>

Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCDXCVII September
MCMXCIII in <URL:news:8jo83h$6ij$1@orpheus.gellyfish.com>:
:} On Sun, 02 Jul 2000 18:35:25 +0200 Markus Hediger wrote:
:} > Hello!
:} > 
:} > Does anyone know the ultimative regular expression or algorithm to split a
:} > single line from a standart logfile into its fields?
:} > 
:} > A line looking like:
:} > 
:} > ad25-175.compuserve.com - - [02/Mar/1997:05:03:49 -0500]
:} > "GET /selfhtml/tg.htm HTTP/1.0" 200 1788
:} 
:} Looks something like :
:} 
:}    m/(\d+\.\d+\.\d+\.\d+)\s # IP Number of client

Hmmm, that means, it doesn't match any of the given examples....

:}      (\S*)\s(\S*)\s         # User ?
:}      \[(.*)\]\s             # Time
:}      "([^"]*)"\s            # Request
:}      (\d{3})\s              # Status
:}      (\d*)\s*$              # Size of data xfered
:}     /x;
:} 
:} But you will probably want to read the perlre manpage ...



Abigail
-- 
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
                       -> define ("foldoc", "perl")) [0] -> print'


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

Date: Tue, 04 Jul 2000 09:13:44 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Examine A Standart Logfile
Message-Id: <cVh85.1267$iP2.115117@news.dircon.co.uk>

On 04 Jul 2000 00:15:27 EDT, Abigail Wrote:
> Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCDXCVII September
> MCMXCIII in <URL:news:8jo83h$6ij$1@orpheus.gellyfish.com>:
> :} On Sun, 02 Jul 2000 18:35:25 +0200 Markus Hediger wrote:
> :} > Hello!
> :} > 
> :} > Does anyone know the ultimative regular expression or algorithm to split a
> :} > single line from a standart logfile into its fields?
> :} > 
> :} > A line looking like:
> :} > 
> :} > ad25-175.compuserve.com - - [02/Mar/1997:05:03:49 -0500]
> :} > "GET /selfhtml/tg.htm HTTP/1.0" 200 1788
> :} 
> :} Looks something like :
> :} 
> :}    m/(\d+\.\d+\.\d+\.\d+)\s # IP Number of client
> 
> Hmmm, that means, it doesn't match any of the given examples....
> 

Er, no, It did match the examples in *my* examples though ...

/J\


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

Date: Sat, 08 Jul 2000 19:00:53 GMT
From: "David Cruz" <cruz.d@worldnet.att.net>
Subject: Executable?
Message-Id: <FTK95.1293$bR6.88684@bgtnsc04-news.ops.worldnet.att.net>

Looking for a way to compile Perl scripts so that they can be executed on
machines without a Perl installation.  Is there anyway to do this?




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

Date: Sat, 08 Jul 2000 14:16:36 -0500
From: Nnickee <nnickee@nnickee.com>
Subject: Re: Executable?
Message-Id: <063650A929DFD506.673354EA184E3B22.332D983439CE0BFD@lp.airnews.net>

On Sat, 08 Jul 2000 19:00:53 GMT, someone claiming to be "David Cruz"
<cruz.d@worldnet.att.net> said:

>Looking for a way to compile Perl scripts so that they can be executed on
>machines without a Perl installation.  Is there anyway to do this?

Yup, sure is.

http://www.indigostar.com/perl2exe.htm

Nnickee



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

Date: 10 Jul 2000 05:54:14 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Executable?
Message-Id: <slrn8mip86.n8g.dha@panix6.panix.com>

On Sat, 08 Jul 2000 19:00:53 GMT, David Cruz <cruz.d@worldnet.att.net> wrote:
>Looking for a way to compile Perl scripts so that they can be executed on
>machines without a Perl installation.  Is there anyway to do this?

The correct answer is "maybe".  Unfortunately, you appear not to have
read the Perl FAQ, which discusses this issue.

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
If I ever saw this in real code I'd beat the author senseless with
their own limbs.
      - Michael G. Schwern


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

Date: Mon, 10 Jul 2000 10:48:52 +0100
From: Wise TV <admin@wisecommunity.com>
Subject: Experienced PERL / CGI programmers needed
Message-Id: <39699C04.32EB@wisecommunity.com>

Wise Television Limited requires experienced PERL / CGI programmers for
a variety of contract worl.

Ideally we need people in the North West of England, but any application
will be considered.

Please email CV to admin@wisecommunity.com

Thanks

Nick


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

Date: Mon, 10 Jul 2000 15:24:08 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Experienced PERL / CGI programmers needed
Message-Id: <8kcq0j$45r$1@news.mch.sbs.de>

In article <39699C04.32EB@wisecommunity.com>, admin@wisecommunity.com wrote:
>Wise Television Limited requires experienced PERL / CGI programmers for
>a variety of contract worl.
[snip]

I'm afraid we're all out of worl here. Maybe try a newsgroup that
contains .jobs ?


Michel.


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

Date: Mon, 10 Jul 2000 12:33:35 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Experienced PERL / CGI programmers needed
Message-Id: <slrn8mjumv.v3.tadmc@magna.metronet.com>

On Mon, 10 Jul 2000 15:24:08 GMT, Michel Dalle <michel.dalle@usa.net> wrote:
>In article <39699C04.32EB@wisecommunity.com>, admin@wisecommunity.com wrote:
>>Wise Television Limited requires experienced PERL / CGI programmers for
>>a variety of contract worl.
>[snip]
>
>I'm afraid we're all out of worl here.
                             ^^^^


To get back onto the topic of Perl, rather than jobs,
here is a crude typo-finder:


----------------------------------
#!/usr/bin/perl -w
use strict;

foreach ( possible_typo('worl') ) {
   print "$_\n";
}

sub possible_typo {
   my($typo) = @_;
   my @patterns;
   my @words;

   foreach ( 0 .. length($typo)-1 ) {
      my $pat = $typo;
      substr($pat, $_, 1) = '.';   # wrong character?
      push @patterns, $pat;

      $pat = $typo;
      substr($pat, $_, 0) = '.';   # missing character?
      push @patterns, $pat;
   }
   push @patterns, "$typo.";       # missing character at end?

   my $pat = join '|', @patterns;

   open(DICT, '/usr/dict/words') || die "could not open '/usr/dict/words' $!";
   while (<DICT>) {
      push @words, $1 if /^($pat)$/o;
   }
   close DICT;

   return @words;
}
----------------------------------

finds:

whorl
wool
word
wore
work
world
worm
worn


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Mon, 10 Jul 2000 17:59:40 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Experienced PERL / CGI programmers needed
Message-Id: <8kd346$a7e$1@news.mch.sbs.de>

In article <slrn8mjumv.v3.tadmc@magna.metronet.com>, tadmc@metronet.com (Tad McClellan) wrote:
>On Mon, 10 Jul 2000 15:24:08 GMT, Michel Dalle <michel.dalle@usa.net> wrote:
>>In article <39699C04.32EB@wisecommunity.com>, admin@wisecommunity.com wrote:
>>>Wise Television Limited requires experienced PERL / CGI programmers for
>>>a variety of contract worl.
>>[snip]
>>
>>I'm afraid we're all out of worl here.
>                             ^^^^
>To get back onto the topic of Perl, rather than jobs,
>here is a crude typo-finder:
[snip]

I'm sure the OP will be glad to hear it :)

Michel.


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

Date: Fri, 07 Jul 2000 15:15:02 GMT
From: timfi@my-deja.com
Subject: File Handle Data size limits
Message-Id: <8k4s5b$p9h$1@nnrp1.deja.com>

Is perl's File Handle data size limited to 32 bits?

If so, how can you open files in perl that are greater than 2.1 gbytes?


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 7 Jul 2000 10:07:40 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: File Handle Data size limits
Message-Id: <8k52pn$jt7$1@brokaw.wa.com>


<timfi@my-deja.com> wrote in message news:8k4s5b$p9h$1@nnrp1.deja.com...
> Is perl's File Handle data size limited to 32 bits?
>
> If so, how can you open files in perl that are greater than 2.1 gbytes?

If it's unsigned you get a number twice as large!  4294967295  :-)

But that's not really the point.  The filehandle is a pointer to the
location of the file on the disk.  It is not indicative of anything other
than where to start reading the file.  So your question doesn't really make
sense.

Is there something that you are trying to accomplish that you haven't
mentioned?

Lauren





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

Date: Fri, 07 Jul 2000 19:09:54 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: File Handle Data size limits
Message-Id: <39662B48.4ABC9444@rochester.rr.com>

timfi@my-deja.com wrote:
> 
> Is perl's File Handle data size limited to 32 bits?
> 
> If so, how can you open files in perl that are greater than 2.1 gbytes?
 ...
I assume your real question is:  how can I open a large file?  The
answer appears to be system-dependent.  Check your system docs (sysopen
and fcntl in particular) for the O_LARGEFILE constant.  If you find that
and include it in a sysopen, you may be in luck.  Check perldoc
perlopentut.  If you have Perl 5.6 and your OS can handle largefiles,
you're in luck -- it supports them by default.
-- 
Bob Walton


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

Date: Wed, 05 Jul 2000 22:05:44 -0700
From: Matthew Keene <matthew.keeneNOmaSPAM@colesmyer.com.au.invalid>
Subject: File ownership under Win32
Message-Id: <01b32558.bfddd62b@usw-ex0106-045.remarq.com>

Does anybody know how to find out who the owner of a file is
under Win32 ?  (I'm running Windows NT.)  I can access the ACL
without a problem using Win32::FileSecurity, but this doesn't
seem to let me find the owner of the file.

Any tips ?

TIA

Matthew


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

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com



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

Date: Sat, 08 Jul 2000 20:06:24 GMT
From: "deninet" <deninet@deninet.com>
Subject: File Widget
Message-Id: <4RL95.142$Jh3.11929@news7.onvoy.net>

Greetings fellow Programmers!

I would like to use the HTML file input form tag, i.e. <input type=file>, to
upload a file from client side to server side.  How would I do that in a
perl script?

Thanx (in advance)!

aeris@deninet.com


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

Date: Sat, 08 Jul 2000 16:20:08 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: File Widget
Message-Id: <39678CF8.8D42CE8F@attglobal.net>

deninet wrote:
> 
> Greetings fellow Programmers!
> 
> I would like to use the HTML file input form tag, i.e. <input type=file>, to
> upload a file from client side to server side.  How would I do that in a
> perl script?

You said widget.  That makes me thing of Tk, not CGI.  

As to your question, two words:

use CGI;

Check out the documentation on the CGI.pm module, it handles such things 
with relative ease, and comes standard with your perl install.

$ perldoc CGI


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

Date: Fri, 07 Jul 2000 14:00:29 -0500
From: Bob Jones <sam_rui@yahoo.com>
Subject: Filehandle for a buffer (array) ?
Message-Id: <396628CD.1C182C73@yahoo.com>


Instead of doing this:
push(@buffer,"<HTML>\n<HEAD>\n<TITLE>Hello</TITLE>.. ..</HTML>");

Is there anyway of doing like this without going for a (tmp) file:

print BUFFER_HANDLE <<END
<HTML>
<HEAD>
<TITLE>Hello</TITLE>
 ..
 ..
</HTML>
END

How to create a buffer handle for buffer?

thanks,
Bob/-


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

Date: Fri, 7 Jul 2000 15:15:47 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Filehandle for a buffer (array) ?
Message-Id: <slrn8mcb33.mjr.tadmc@magna.metronet.com>

On Fri, 07 Jul 2000 14:00:29 -0500, Bob Jones <sam_rui@yahoo.com> wrote:
>
>Instead of doing this:
>push(@buffer,"<HTML>\n<HEAD>\n<TITLE>Hello</TITLE>.. ..</HTML>");
>
>Is there anyway of doing like this without going for a (tmp) file:
>
>print BUFFER_HANDLE <<END
                         ^^
                         ^^ there ought to be a semicolon there
><HTML>
><HEAD>
><TITLE>Hello</TITLE>
>..
>..
></HTML>
>END
>
>How to create a buffer handle for buffer?


The here-doc ( the << thingie ) is just another way of
quoting strings. It has no special connection with print()
(and therefore, no connection to output in general).

The usual way of saving the contents of a quoted string
is to put them into a variable. You put it into an array
variable above, but you can just put it into a scalar
if you prefer:

my $buffered_stuff = <<END;
<HTML>
<HEAD>
<TITLE>Hello</TITLE>
 ..
 ..
</HTML>
END

 ... time passes ...


print $buffered_stuff;


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 07 Jul 2000 21:18:55 GMT
From: genadi@my-deja.com
Subject: Filter script and Apache
Message-Id: <8k5hfk$746$1@nnrp1.deja.com>

In my program all traffic directed thru filter script. For security
reasons I would like to remove any references to this script from the
path displayed in the source code.
Somebody suggested to use Apache mod_rewrite module.
Does anybody has any experience with it and is it possible to acheive
what I need using this module.
Any ideas?
Thanks.
Genadi.



Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Sat, 08 Jul 2000 01:44:20 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Filter script and Apache
Message-Id: <MPG.13d124bfd522a7ee989776@news>

genadi@my-deja.com writes ..
>In my program all traffic directed thru filter script. For security
>reasons I would like to remove any references to this script from the
>path displayed in the source code.
>Somebody suggested to use Apache mod_rewrite module.
>Does anybody has any experience with it and is it possible to acheive
>what I need using this module.

how many times are you going to ask this off topic question ?

Apache's mod_rewrite module has nothing to do with Perl and hence 
nothing to do with this newsgroup

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Fri, 07 Jul 2000 19:05:11 GMT
From: gena <gmakhlin@atreuscorp.com>
Subject: Filter script question
Message-Id: <39662901.9582DC7A@atreuscorp.com>

In my program all traffic directed thru filter script. For security
reasons I would like to remove any references to this script from the
path displayed in the source code.
Somebody suggested to use Apache mod_rewrite module.
Does anybody has any experience with it and is it possible to acheive
what I need using this module.
Any ideas?
Thanks.
Genadi.



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

Date: Wed, 5 Jul 2000 00:20:01 +0200
From: "--==lightsphere==--" <lightsphere@gmx.de>
Subject: Flash and Perl !
Message-Id: <8jtnuh$nqa$1@news.netcologne.de>

Hi

I tryed to load a text file into flash, which is simple but now i want to
use a perl script to give to variables to flash.

my test perl script looks like this :

#! /usr/bin/perl

    $var1 = "english";
    $var2 = "german";

# print "Content-type: text/html\n\n";
print "var1=$var1&var2=$var2";

exit;

but this doesnt seem to work. It displayes the variables good when i call it
directly and have the "print "Content-type: text/html\n\n";" active, but the
flash doesnt use that variables !!


Thanks for helping !

mcb




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

Date: 04 Jul 2000 19:30:53 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: Flash and Perl !
Message-Id: <slrn8m4tv2.59a.abigail@alexandra.delanet.com>

--==lightsphere==-- (lightsphere@gmx.de) wrote on MMCDXCIX September
MCMXCIII in <URL:news:8jtnuh$nqa$1@news.netcologne.de>:
** Hi
** 
** I tryed to load a text file into flash, which is simple but now i want to
** use a perl script to give to variables to flash.
** 
** my test perl script looks like this :
** 
** #! /usr/bin/perl
** 
**     $var1 = "english";
**     $var2 = "german";
** 
** # print "Content-type: text/html\n\n";
** print "var1=$var1&var2=$var2";
** 
** exit;
** 
** but this doesnt seem to work. It displayes the variables good when i call it
** directly and have the "print "Content-type: text/html\n\n";" active, but the
** flash doesnt use that variables !!


But it prints out 'var1=english&var2=german' on STDOUT fine.

Hence, there's no problem with the Perl part. It looks like you are
having Flash or HTML problems (what you are printing out is certainly
invalid HTML). Neither of those is a valid topic for this group.

You ought to seek help elsewhere.



Abigail
-- 
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT


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

Date: Wed, 05 Jul 2000 01:27:34 +0100
From: Magic <Magic@mattnet.freeserve.co.uk>
Subject: Re: Flash and Perl !
Message-Id: <4605ms0v57bfp8rq3162d9dsfrirts6oeh@4ax.com>

On Wed, 5 Jul 2000 00:20:01 +0200, "--==lightsphere==--"
<lightsphere@gmx.de> wrote:

> Hi
> 
> I tryed to load a text file into flash, which is simple but now i
want to
> use a perl script to give to variables to flash.
> 

Hi there,

	I'm afraid I don't have a solution for you, but you might like to
try asking in alt.macromedia.flash as the people there are very
helpful and deal with this type of problem on a regular basis.

Hope this helps!


Magic        ==|:o)
-- 
Location : Portsmouth, England, UK
Homepage : http://www.mattnet.freeserve.co.uk
EMail : mailto:Magic@mattnet.freeserve.co.uk


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

Date: Thu, 6 Jul 2000 02:14:44 -0400
From: NagaPutih <s0218327@unix1.cc.ysu.edu>
Subject: Re: Flash and Perl !
Message-Id: <Pine.A41.4.20.0007060205330.24822-100000@unix1.cc.ysu.edu>

On Wed, 5 Jul 2000, --==lightsphere==-- wrote:
> # print "Content-type: text/html\n\n";

you definitely need to print this header, so make sure you uncomment it

> but this doesnt seem to work. It displayes the variables good when i call it
> directly and have the "print "Content-type: text/html\n\n";" active, but the
> flash doesnt use that variables !!

1) is this a stand-alone player, or an embedded movie ran inside a
browser? you'll need to send using GET for a stand-alone player, or POST
otherwise. also, set the level to 0.

2) they should be accessible using syntax /:var_name


g'luck.
-NagaPutih



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

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


Administrivia:

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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V9 Issue 3563
**************************************


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