[29526] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 770 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 19 11:09:41 2007

Date: Sun, 19 Aug 2007 08:09:06 -0700 (PDT)
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, 19 Aug 2007     Volume: 11 Number: 770

Today's topics:
        A question about regex <mc79@cse.buffalo.edu>
    Re: A question about regex <mritty@gmail.com>
    Re: how to call sub by value in variable - SOLVED <stoupa@practisoft.cz>
        how to call sub by value in variable <stoupa@practisoft.cz>
    Re: how to call sub by value in variable xhoster@gmail.com
    Re: how to call sub by value in variable <stoupa@practisoft.cz>
    Re: how to call sub by value in variable xhoster@gmail.com
    Re: how to call sub by value in variable <noreply@gunnar.cc>
    Re: how to call sub by value in variable <bik.mido@tiscalinet.it>
    Re: how to call sub by value in variable <paduille.4061.mumia.w+nospam@earthlink.net>
        new CPAN modules on Sun Aug 19 2007 (Randal Schwartz)
        perl parse across multiple line in txt file <bhooshan.dixit@gmail.com>
    Re: perl parse across multiple line in txt file <tadmc@seesig.invalid>
    Re: perl parse across multiple line in txt file <tadmc@seesig.invalid>
    Re: Sending a "status" <m@rtij.nl.invlalid>
        Symbolic representation of logical operators (Mark Hobley)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 19 Aug 2007 10:18:15 -0400
From: Madhusudhanan Chandrasekaran <mc79@cse.buffalo.edu>
Subject: A question about regex
Message-Id: <Pine.SOL.4.56.0708190955090.7047@pollux.cse.buffalo.edu>

Hi,

I am a perl newbie. I am reading from a file line by line and
matching it for a partiuclar regex. If the match is found, I want
to print the previous and the next few lines.

i.e. if the lines of the file are:

This is a
String
But I do not
know how to
print it


and if my pattern is "But I do not", I would like to print as
"String But I do not know how to". Here it prints out the previous
and the next line, keeping it variable is desired.

Thanks in advance,
_Madhu

--------------------------------------------------
All in all I'm just another brick in the FIREWALL.



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

Date: Sun, 19 Aug 2007 07:36:37 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: A question about regex
Message-Id: <1187534197.037550.326030@w3g2000hsg.googlegroups.com>

On Aug 19, 10:18 am, Madhusudhanan Chandrasekaran
<m...@cse.buffalo.edu> wrote:
> I am a perl newbie. I am reading from a file line by line and
> matching it for a partiuclar regex. If the match is found, I want
> to print the previous and the next few lines.
>
> i.e. if the lines of the file are:
>
> This is a
> String
> But I do not
> know how to
> print it
>
> and if my pattern is "But I do not", I would like to print as
> "String But I do not know how to".

Show what you've done so far, and someone can help you out.

Also, have you checked the FAQ?
$ perldoc -q "more than one line"
Found in /software/perl-5.8.5-0/pkg/lib/5.8.5/pod/perlfaq6.pod
     I'm having trouble matching over more than one line.  What's
     wrong?

In general, if you're processing line-by-line like you say you are,
there is no particular regexp that's going to help you.  As you read
through each line, save the current line in some variable, then when
you find your match, print that variable you saved, print the current
line, and read and print once more.

Paul Lalli



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

Date: Sun, 19 Aug 2007 16:46:07 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: how to call sub by value in variable - SOLVED
Message-Id: <fa9li2$d0f$1@ns.felk.cvut.cz>

My final solution. Maybe is possible to write it without using eval() ???

--------- CUT --------
#!/usr/bin/perl
use strict;
use warnings;

my %dispatch;
open IN,"< $0";
while(<IN>)
{
    chomp;
    if(m/^sub\s+ex_([^\s\{]+)/)
        {
        eval('$dispatch{' . $1 . '} = \&ex_' . $1);
        }
}
close IN;
foreach my $sub (qw/test1 test3 test2/)
    {
    foreach my $name (qw/Petr John/)
        {
        if(defined $dispatch{$sub}) {$dispatch{$sub}->($name);}
        else {warn "Sub '$sub' not defined\n";}
        }
    }

sub ex_test1
{
my $txt=shift;
print "Hallo $txt\n";
}

sub ex_test2
{
my $txt=shift;
print "Bye $txt\n";
}
--------- CUT --------

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail 
from another non-spammer site please.)




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

Date: Sun, 19 Aug 2007 02:56:09 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: how to call sub by value in variable
Message-Id: <fa84fl$2ohh$1@ns.felk.cvut.cz>

I have this simple script

#!/usr/bin/perl
use strict;

foreach my $sub (qw/test1 test2/)
    {
    foreach my $name (qw/Petr John/)
        {
        no strict 'refs';
        &$sub($name);
        }
    }

sub test1
{
my $txt=shift;
print "Hallo $txt\n";
}

sub test2
{
my $txt=shift;
print "Bye $txt\n";
}

I use no strict 'refs' and it work fine, but how to write this with strict 
refs? It is possible? I need to use it first time in my live and reason is 
that subroutine names (in real script) are stored in MySQL.
-- 

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail 
from another non-spammer site please.)




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

Date: 19 Aug 2007 01:19:43 GMT
From: xhoster@gmail.com
Subject: Re: how to call sub by value in variable
Message-Id: <20070818211951.189$DO@newsreader.com>

"Petr Vileta" <stoupa@practisoft.cz> wrote:
> I have this simple script
>
> #!/usr/bin/perl
> use strict;
>

my %dispatch = ( test1 => \&test1, test2 => \&test2);

> foreach my $sub (qw/test1 test2/)
>     {
>     foreach my $name (qw/Petr John/)
>         {

          $dispatch{$sub}->($name);

>         }
>     }
 ...
>
> I use no strict 'refs' and it work fine, but how to write this with
> strict refs? It is possible? I need to use it first time in my live and
> reason is that subroutine names (in real script) are stored in MySQL.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Sun, 19 Aug 2007 04:28:25 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: how to call sub by value in variable
Message-Id: <fa89sk$2r59$1@ns.felk.cvut.cz>

xhoster@gmail.com wrote:
> "Petr Vileta" <stoupa@practisoft.cz> wrote:
>> I have this simple script
>>
>> #!/usr/bin/perl
>> use strict;
>>
>
> my %dispatch = ( test1 => \&test1, test2 => \&test2);
>
>> foreach my $sub (qw/test1 test2/)
>>     {
>>     foreach my $name (qw/Petr John/)
>>         {
>
>          $dispatch{$sub}->($name);
>
>>         }
>>     }
> ...
>>
>> I use no strict 'refs' and it work fine, but how to write this with
>> strict refs? It is possible? I need to use it first time in my live
>> and reason is that subroutine names (in real script) are stored in
>> MySQL.
>
Hmm, very nice ;-) By your solution I must define $dispatch{...} for all my 
subs. Of course it is correct practice but  I get sub's names from database. 
If I get sub name which not exist then my script write something into system 
log file but still run and call other subs which exists.

So I see I must write other example. Not with using database but using text 
files. Please can you make changes to this example? Please keep in mind that 
these text files are generated out of my control. My idea is that when my 
script get sub name which exist then call this, in other case generate some 
error but continue run.

--- file routines.txt ---
test1
test1a
test2
---------------------------

--- file names.txt ---
Petr
John
--------------------------

#!/usr/bin/perl
use strict;

open IN,"routines.txt";
my @roitines=<IN>;
close IN;
open IN,"names.txt";
my @names=<IN>;
close IN;
foreach my $sub (@routines)
    {
    foreach my $name (@names)
        {
        no strict 'refs';
        &$sub($name);
        }
    }

sub test1
{
my $txt=shift;
print "Hallo $txt\n";
}

sub test2
{
my $txt=shift;
print "Bye $txt\n";
}

-- 

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail 
from another non-spammer site please.)





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

Date: 19 Aug 2007 03:14:49 GMT
From: xhoster@gmail.com
Subject: Re: how to call sub by value in variable
Message-Id: <20070818231458.086$AI@newsreader.com>

"Petr Vileta" <stoupa@practisoft.cz> wrote:
> xhoster@gmail.com wrote:
> > "Petr Vileta" <stoupa@practisoft.cz> wrote:
> >> I have this simple script
> >>
> >> #!/usr/bin/perl
> >> use strict;
> >>
> >
> > my %dispatch = ( test1 => \&test1, test2 => \&test2);
> >
> >> foreach my $sub (qw/test1 test2/)
> >>     {
> >>     foreach my $name (qw/Petr John/)
> >>         {
> >
> >          $dispatch{$sub}->($name);
> >
> >>         }
> >>     }
> > ...
> >>
> >> I use no strict 'refs' and it work fine, but how to write this with
> >> strict refs? It is possible? I need to use it first time in my live
> >> and reason is that subroutine names (in real script) are stored in
> >> MySQL.
> >
> Hmm, very nice ;-) By your solution I must define $dispatch{...} for all
> my subs.

Just for all of the ones you want to be runnable based on data from the
database!

> Of course it is correct practice but  I get sub's names from
> database. If I get sub name which not exist

What do you use to know that it does not exist?  What if it does exist,
it just isn't a sub you want to be run based on data retrieved from
the database?

> then my script write
> something into system log file but still run and call other subs which
> exists.
>
> So I see I must write other example. Not with using database but using
> text files. Please can you make changes to this example? Please keep in
> mind that these text files are generated out of my control.

It seems to me to be very dangerous to run subroutines whose names are
based on things generated beyond your control.  But, if you are quite
certain that that is what you want to do, then turning of strict the way
you did in you example seems to be way to do it.

In other words, since what you want to do fundamentally violates the spirit
of "use strict", the most straightforward way to do it is to turn off
strict for that block.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Sun, 19 Aug 2007 07:12:17 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: how to call sub by value in variable
Message-Id: <5iq1pqF3rbvqmU1@mid.individual.net>

Petr Vileta wrote:
> I get sub's names from 
> database. If I get sub name which not exist then my script write 
> something into system log file but still run and call other subs which 
> exists.

Why would that prevent you from using a dispatch table instead of 
playing with symrefs?

> So I see I must write other example. Not with using database but using 
> text files. Please can you make changes to this example? Please keep in 
> mind that these text files are generated out of my control. My idea is 
> that when my script get sub name which exist then call this, in other 
> case generate some error but continue run.
> 
> --- file routines.txt ---
> test1
> test1a
> test2
> ---------------------------
> 
> --- file names.txt ---
> Petr
> John
> --------------------------
> 
> #!/usr/bin/perl
> use strict;

     use warnings;

     my %dispatch = ( test1 => \&test1, test2 => \&test2 );

     open my $routines, '<', 'routines.txt' or die $!;
     open my $names, '<', 'names.txt' or die $!;
     chomp( my @names = <$names> );

     while ( my $sub = <$routines> ) {
         chomp $sub;
         unless ( $dispatch{$sub} ) {
             print "Function '$sub' not found\n";
             next;
         }
         $dispatch{$sub}->($_) for @names;
     }

> sub test1
> {
> my $txt=shift;
> print "Hallo $txt\n";
> }
> 
> sub test2
> {
> my $txt=shift;
> print "Bye $txt\n";
> }

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Sun, 19 Aug 2007 10:32:12 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: how to call sub by value in variable
Message-Id: <oqvfc3pjcvel2i6aov6h1tpkrtrltpfni8@4ax.com>

On Sun, 19 Aug 2007 04:28:25 +0200, "Petr Vileta"
<stoupa@practisoft.cz> wrote:

>> my %dispatch = ( test1 => \&test1, test2 => \&test2);
>>
>>> foreach my $sub (qw/test1 test2/)
>>>     {
>>>     foreach my $name (qw/Petr John/)
>>>         {
>>
>>          $dispatch{$sub}->($name);
[snip]
>Hmm, very nice ;-) By your solution I must define $dispatch{...} for all my 
>subs. Of course it is correct practice but  I get sub's names from database. 
>If I get sub name which not exist then my script write something into system 
>log file but still run and call other subs which exists.

  my $code=$dispatch{$sub};
  if (defined $code) {
      Log "'$sub' does not exist";
  } else {
      $code->($name);
  }


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Sun, 19 Aug 2007 03:36:17 -0500
From: "Mumia W." <paduille.4061.mumia.w+nospam@earthlink.net>
Subject: Re: how to call sub by value in variable
Message-Id: <13cg098d3g1b6e4@corp.supernews.com>

On 08/18/2007 07:56 PM, Petr Vileta wrote:
> I have this simple script
> 
> #!/usr/bin/perl
> use strict;
> 
> foreach my $sub (qw/test1 test2/)
>    {
>    foreach my $name (qw/Petr John/)
>        {
>        no strict 'refs';
>        &$sub($name);
>        }
>    }
> 
> sub test1
> {
> my $txt=shift;
> print "Hallo $txt\n";
> }
> 
> sub test2
> {
> my $txt=shift;
> print "Bye $txt\n";
> }
> 
> I use no strict 'refs' and it work fine, but how to write this with 
> strict refs? It is possible? I need to use it first time in my live and 
> reason is that subroutine names (in real script) are stored in MySQL.

You can keep strict refs enabled if you are willing to turn the 
subroutines into methods:

#!/usr/bin/perl
use strict;
use warnings;

foreach my $sub (qw/test1 test2/)
    {
    foreach my $name (qw/Petr John/)
        {
         __PACKAGE__->$sub($name);
        }
    }

sub test1
{
shift;
my $txt=shift;
print "Hallo $txt\n";
}

sub test2
{
shift;
my $txt=shift;
print "Bye $txt\n";
}

__END__

This can still be dangerous I think, so validate your input before 
calling the methods. It's better to just use a dispatch table as the 
others said.





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

Date: Sun, 19 Aug 2007 04:42:17 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Aug 19 2007
Message-Id: <Jn07qH.1wnD@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

App-Wack-0.01
http://search.cpan.org/~szabgab/App-Wack-0.01/
the actual code of wack the wisual ack 
----
App-Wack-0.02
http://search.cpan.org/~szabgab/App-Wack-0.02/
the actual code of wack the wisual ack 
----
Authen-Prepare-0.02
http://search.cpan.org/~dnarayan/Authen-Prepare-0.02/
Prepare a set of authentication credentials 
----
CGI-Application-Plugin-Authorization-0.06
http://search.cpan.org/~ceeshek/CGI-Application-Plugin-Authorization-0.06/
Authorization framework for CGI::Application 
----
CPAN-FindDependencies-1.01
http://search.cpan.org/~dcantrell/CPAN-FindDependencies-1.01/
find dependencies for modules on the CPAN 
----
CPAN-Inject-0.09
http://search.cpan.org/~adamk/CPAN-Inject-0.09/
Base class for injecting distributions into CPAN sources 
----
CPANPLUS-0.82
http://search.cpan.org/~kane/CPANPLUS-0.82/
API & CLI access to the CPAN mirrors 
----
Catalyst-View-MicroMason-0.05
http://search.cpan.org/~jrockway/Catalyst-View-MicroMason-0.05/
MicroMason View Class 
----
Catalyst-View-Template-Declare-0.02
http://search.cpan.org/~jrockway/Catalyst-View-Template-Declare-0.02/
Use Template::Declare with Catalyst 
----
Catalyst-View-Templated-0.01
http://search.cpan.org/~jrockway/Catalyst-View-Templated-0.01/
generic base class for template-based views 
----
HTML-ListToTree-1.01
http://search.cpan.org/~darnold/HTML-ListToTree-1.01/
Convert nested HTML lists to Javascripted tree widget 
----
IPC-MorseSignals-0.05
http://search.cpan.org/~vpit/IPC-MorseSignals-0.05/
Communicate between processes with Morse signals. 
----
Mail-SpamCannibal-0.81
http://search.cpan.org/~miker/Mail-SpamCannibal-0.81/
A tool to stop SPAM 
----
Module-Mapper-1.01
http://search.cpan.org/~darnold/Module-Mapper-1.01/
Find source for modules and optionally map to another directory 
----
Muldis-DB-0.3.1
http://search.cpan.org/~duncand/Muldis-DB-0.3.1/
Full-featured truly relational DBMS in Perl 
----
Net-Domain-ExpireDate-0.42
http://search.cpan.org/~despair/Net-Domain-ExpireDate-0.42/
obtain expiration date of domain names 
----
Net-Google-Picasa-0.01
http://search.cpan.org/~cchamber/Net-Google-Picasa-0.01/
Perl module for accessing the Google Picasa web API 
----
Net-Whois-Raw-1.24
http://search.cpan.org/~despair/Net-Whois-Raw-1.24/
Get Whois information for domains 
----
PPI-HTML-CodeFolder-1.01
http://search.cpan.org/~darnold/PPI-HTML-CodeFolder-1.01/
PPI::HTML Subclass providing code folding and compression 
----
Params-Util-0.28
http://search.cpan.org/~adamk/Params-Util-0.28/
Simple, compact and correct param-checking functions 
----
Pod-Classdoc-1.01
http://search.cpan.org/~darnold/Pod-Classdoc-1.01/
Generate Javadoc-like detail class documentation from POD 
----
TAP-Parser-0.53
http://search.cpan.org/~andya/TAP-Parser-0.53/
Parse TAP output 
----
Tree-Trie-1.4
http://search.cpan.org/~avif/Tree-Trie-1.4/
A data structure optimized for prefix lookup. 
----
pler-0.20
http://search.cpan.org/~adamk/pler-0.20/
The DWIM Perl Debugger 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sun, 19 Aug 2007 02:39:24 -0000
From:  bcdixit <bhooshan.dixit@gmail.com>
Subject: perl parse across multiple line in txt file
Message-Id: <1187491164.063554.134840@x40g2000prg.googlegroups.com>

i have a file with the following sample text

1 create table xyz
2 no before journal,
3 no after journal
4 (
5 col1 integer,
6 col2 integer,
7 ...
8 coln varchar(10)
9 )
10;
i want to use perl regex to search and replace text from the line that
starts with 'create' word till the first opening bracket i.e the '('
with blanks or rather delete the lines altogether.
the output should look something like this.


1 col1 integer,
2 col2 integer,
3 ...
4 coln varchar(10)
5 )
6;

the input file could also have the following scenarios..
1 create table xyz no before journal,
2 no after journal
3 (
4 col1 integer,
5 col2 integer,
6 ...
7 coln varchar(10)
8 )
9;

OR


1 create table xyz no before journal,
2 no after journal (
3 col1 integer,
4 col2 integer,
5 ...
6 coln varchar(10)
7 )
8;

OR

1 create table xyz
2 (
3 col1 integer,
4 col2 integer,
5 ...
6 coln varchar(10)
7 )
8;

the only certainty is that line starts with the 'create' word. THERE
COULD BE ANY WORDS BETWEEN THE 'CREATE' AND THE '(' .
so in short, i want the search to look for any line that begins with
the 'create' word and then continue the search till the first '(' and
replace the match with deleted lines.

I know how to use perl regex to search for one line at a time but not
if the condition could be across multiple lines.

any help will be greatly appreciated.

thanks



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

Date: Sat, 18 Aug 2007 23:13:36 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: perl parse across multiple line in txt file
Message-Id: <slrnfcfgrg.4ou.tadmc@tadmc30.sbcglobal.net>

bcdixit <bhooshan.dixit@gmail.com> wrote:
> i have a file with the following sample text
>
> 1 create table xyz
> 2 no before journal,
> 3 no after journal
> 4 (
> 5 col1 integer,
> 6 col2 integer,
> 7 ...
> 8 coln varchar(10)
> 9 )
> 10;
> i want to use perl regex to search and replace text from the line that
> starts with 'create'


There is no line there that starts with 'create'.

There is a line that starts with '1', and with '2', and ...


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Sat, 18 Aug 2007 23:11:32 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: perl parse across multiple line in txt file
Message-Id: <slrnfcfgnk.4lm.tadmc@tadmc30.sbcglobal.net>

bcdixit <bhooshan.dixit@gmail.com> wrote:
> i have a file with the following sample text
>
> 1 create table xyz
> 2 no before journal,
> 3 no after journal
> 4 (
> 5 col1 integer,
> 6 col2 integer,
> 7 ...
> 8 coln varchar(10)
> 9 )
> 10;
> i want to use perl regex to search and replace text from the line that
> starts with 'create' word till the first opening bracket i.e the '('
> with blanks or rather delete the lines altogether.
> the output should look something like this.
>
>
> 1 col1 integer,
> 2 col2 integer,
> 3 ...
> 4 coln varchar(10)
> 5 )
> 6;


   perldoc -q between

       How can I pull out lines between two patterns that are themselves on dif‐
       ferent lines?


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

my $cnt=1;
while ( <DATA> ) {
   next if /^\d+ create/ .. /^\d+ \(/;
   s/^\d+/$cnt/;
   $cnt++;
   print;
}

__DATA__
1 create table xyz
2 no before journal,
3 no after journal
4 (
5 col1 integer,
6 col2 integer,
7 ...
8 coln varchar(10)
9 )
10;
--------------------------


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Sun, 19 Aug 2007 08:51:02 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Sending a "status"
Message-Id: <pan.2007.08.19.06.51.02@rtij.nl.invlalid>

On Sat, 18 Aug 2007 16:11:46 +0200, Petr Vileta wrote:

> Martijn Lievaart wrote:
>> To be more exact, some versions of IE don't display anything unless
>> they have received 256 characters (or the page is complete, obviously).
>> So send 256 spaces first and then start outputting the rest. No need to
>> send 1024 spaces on every print.
>>
> Yes, I found this information somewhere too, but in real this is not
> true :-) Some MSIE (maybe some 6.x) need 512 bytes and some Firefox need
> a little more so I send 1024 everytime and this work for most browsers.
> All browsers trash redundant spaces and show only one.

Ah, thanks. Sending 256 spaces "worked for me" up to now, but I like to 
stay on the safe side an will follow your advice.

M4


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

Date: Sun, 19 Aug 2007 15:08:11 GMT
From: markhobley@hotpop.deletethisbit.com (Mark Hobley)
Subject: Symbolic representation of logical operators
Message-Id: <1l1mp4-ifu.ln1@neptune.markhobley.yi.org>
Keywords: symbol,representation,form,logic,operator,perl,gate,named

Some logical operators have symbolic representation. For example:

The doubleampersand && represents the "and" operator
The doublepipe || represents the "or" operator
The pling ! represents the "not" operator

What is the symbolic representation for the "xor" operator?
I don't appear to be able to find this in any documentation.

Regards,

Mark.

-- 
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/



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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V11 Issue 770
**************************************


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