[25638] in Perl-Users-Digest
Perl-Users Digest, Issue: 7880 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 14 18:05:33 2005
Date: Mon, 14 Mar 2005 15:05:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 14 Mar 2005 Volume: 10 Number: 7880
Today's topics:
Re: [Q]: How to sort first abc, then 123? <nospam-abuse@ilyaz.org>
CGI and PL suddenly stopped working momentsofclarity@gmail.com
Re: CGI and PL suddenly stopped working <1usa@llenroc.ude.invalid>
GET MORE FOR YOUR BUCK ml@aol.com
Re: How to make a blessable anonymous scalar ref? <nobull@mail.com>
Re: How to make a blessable anonymous scalar ref? xhoster@gmail.com
Re: How to make a blessable anonymous scalar ref? <socyl@987jk.com.invalid>
install perl on usb flash drive vbhelpski@yahoo.com
Re: install perl on usb flash drive <1usa@llenroc.ude.invalid>
Re: install perl on usb flash drive vbhelpski@yahoo.com
ISS 5 Perl CGi script and 400 Bad Request Error <justin.devine@gmail.com>
Re: ISS 5 Perl CGi script and 400 Bad Request Error <1usa@llenroc.ude.invalid>
Re: printing to xls with Unicode encoding character <pilsl@goldfisch.at>
Re: printing to xls with Unicode encoding character <flavell@ph.gla.ac.uk>
problem writing to stdin of child process (john)
replace multiple spaces between words with single space <shashank@mia.ece.uic.edu>
Re: replace multiple spaces between words with single s (Walter Roberson)
Re: replace multiple spaces between words with single s <1usa@llenroc.ude.invalid>
Re: replace multiple spaces between words with single s <someone@example.com>
SERIOUS MONEY OPPORTUNITY-$5 INVESTMENT-HIGH RESPONSE R feedbackzz@yahoo.com
Re: unix pipes to perl scripts <jl_post@hotmail.com>
Re: unix pipes to perl scripts <therealtroll@yahoo.com>
Re: unix pipes to perl scripts <josef.moellers@fujitsu-siemens.com>
Re: unix pipes to perl scripts <matternc@comcast.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 14 Mar 2005 22:23:17 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: [Q]: How to sort first abc, then 123?
Message-Id: <d152sl$308g$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Fabian Pilkowski
<pilkowsk@informatik.uni-marburg.de>], who wrote in article <MPG.1c9de272ae7e39ef9898d4@news.individual.de>:
> > > Not tested:
> >
> > map {s/~//, $_} sort map {s/^(?=[~\d])/~/, $_} @data;
>
> I have just tried it out but unfortunately it doesn't work as expected
Tested:
map {s/^~//; $_} sort map {s/^(?=[~\d])/~/; $_} @data;
(one '^' inserted, and commas replaced by semicolon).
I have no idea why commas lead to a wrong result - IIRC, if it mixed
map BLOCK DATA with map EXPR, DATA, it would give a syntax error...
Hope this helps,
Ilya
------------------------------
Date: 14 Mar 2005 11:57:20 -0800
From: momentsofclarity@gmail.com
Subject: CGI and PL suddenly stopped working
Message-Id: <1110830240.958081.84790@g14g2000cwa.googlegroups.com>
Hello,
For an as yet determined reason, cgi and perl scripts suddenly stopped
working on my web server. Up until now (about 1 year) all has been
working just fine. I have tried all of the following with no joy...
-confirmed permissions on scripts, directories.
-confirmed proper ExecCGI arguments in httpd.conf
-chmod 777 scripts and directories (with suexec OFF)
-chmod +x /usr/bin/suidperl (suggested by a user on another mail list)
-deleted and relinked /usr/bin/perl to /usr/bin/perl5
Scripts run ok from the command line but only as root. If logged in as
the web user (apache), I get a "bad interpreter: Permission denied".
The browser message is the ever mysterious "500 Internal Server error".
Error logs just say "[error] (13)Permission denied: exec of
/path/to/test.pl failed".
Server info below:
kernel is 2.4.18-6mdk
Perl -v is v5.6.1
httpd -V is:
Server version: Apache-AdvancedExtranetServer/1.3.23 (Mandrake
Linux/4.1mdk)
Server built: Jun 20 2002 09:42:23
Server's Module Magic Number: 19990320:11
Server compiled with....
-D EAPI
-D EAPI_MM
-D EAPI_MM_CORE_PATH="/var/apache-mm/mm"
-D HAVE_MMAP
-D HAVE_SHMGET
-D USE_SHMGET_SCOREBOARD
-D USE_MMAP_FILES
-D HAVE_FCNTL_SERIALIZED_ACCEPT
-D HAVE_SYSVSEM_SERIALIZED_ACCEPT
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="/var/run/httpd.scoreboard"
-D DEFAULT_LOCKFILE="/var/run/httpd.lock"
-D DEFAULT_XFERLOG="/var/log/httpd/access_log"
-D DEFAULT_ERRORLOG="/var/log/httpd/error_log"
-D TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
-D ACCESS_CONFIG_FILE="conf/access.conf"
-D RESOURCE_CONFIG_FILE="conf/srm.conf"
What am I missing?
Thanks.
-Matt
------------------------------
Date: Mon, 14 Mar 2005 22:36:38 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: CGI and PL suddenly stopped working
Message-Id: <Xns9619B3273B1B9asu1cornelledu@127.0.0.1>
momentsofclarity@gmail.com wrote in news:1110830240.958081.84790
@g14g2000cwa.googlegroups.com:
Please note that web server configuration and OS issues are off-topic for
this group.
> What am I missing?
A short, simple CGI script that exhibits the problem.
That way, I would not have to ask if the path to perl is correctly
specified.
If it looks correct, did you transfer these files from a Windows computer
using binary ftp?
See also,
perldoc -q 500
Sinan
------------------------------
Date: Mon, 14 Mar 2005 10:39:04 -0500
From: ml@aol.com
Subject: GET MORE FOR YOUR BUCK
Message-Id: <d14bg3$2knf@bee.cs.kiev.ua>
The biggest store online
www.thebuckstore.com
http://www.thebuckstore.com/
------------------------------
Date: Mon, 14 Mar 2005 17:38:12 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: How to make a blessable anonymous scalar ref?
Message-Id: <d14hre$43v$1@sun3.bham.ac.uk>
kj wrote:
> In <d12530$t0g$1@sun3.bham.ac.uk> Brian McCauley <nobull@mail.com> writes:
>
>
>>kj wrote:
>
>
>>>In <d11a7r$8rm$1@reader1.panix.com> J Krugman <jkrugman345@yahbitoo.com> writes:
>>>
>>>
>>>
>>>>[] and {} are blessable anonymous refs. I.e., both
>>>
>>>
>>>>bless [], 'Foo';
>>>
>>>
>>>>and
>>>
>>>
>>>>bless {}, 'Bar';
>>>
>>>
>>>>Is there a way to get a blessable anonymous ref to a scalar? The
>>>>typical example of an anonymous scalar ref is something like \3,
>>>>but if one tries to bless such a ref, the compiler chokes on the
>>>>"attempt to modify a read-only value".
>>>
>>>
>>>\$_ is not exactly anonymous (after all, it's the scalar formerly
>>>known as foo), but at least you wouldn't have to go through the
>>>mind-scarring experience of having to come up with a name for no
>>>good reason.
>
>
>>Boggle!
>
>
>>But then you are blessing \$foo (or whatever $_ happens to be aliased to
>>at the time). That's hideous!
>
>
> Aw, c'mon, it's not so bad!
No, it really is very very bad.
for ( @some_array ) {
my $object = SomeThing->new; # Corrupts @some_array
}
sub SomeThing::new {
bless \$_;
}
> All we need is one of all those scalars
> who are standing around doing little or nothing, to serve as a
> reference in a little blessing ceremony.
No, this is completely bogus. You need a modifyable scalar value that
is not used past, present, or future for anything else - not even
subsquent iterations of the same code.
> Now, is that so hard?
No it's no hard, it's trivial do{\my $o}.
> OK, how about \$% ?
Now you are just being silly.
------------------------------
Date: 14 Mar 2005 19:56:58 GMT
From: xhoster@gmail.com
Subject: Re: How to make a blessable anonymous scalar ref?
Message-Id: <20050314145658.526$uo@newsreader.com>
J Krugman <jkrugman345@yahbitoo.com> wrote:
> [] and {} are blessable anonymous refs. I.e., both
>
> bless [], 'Foo';
>
> and
>
> bless {}, 'Bar';
>
> Is there a way to get a blessable anonymous ref to a scalar? The
> typical example of an anonymous scalar ref is something like \3,
> but if one tries to bless such a ref, the compiler chokes on the
> "attempt to modify a read-only value".
I see no reason this won't work:
bless \\undef, "Foo";
(Which does not mean that there is no reason it won't work.)
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Mon, 14 Mar 2005 20:10:12 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: Re: How to make a blessable anonymous scalar ref?
Message-Id: <d14r34$du5$1@reader1.panix.com>
In <d14hre$43v$1@sun3.bham.ac.uk> Brian McCauley <nobull@mail.com> writes:
>Now you are just being silly.
Finally.
kj
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
------------------------------
Date: 14 Mar 2005 06:10:17 -0800
From: vbhelpski@yahoo.com
Subject: install perl on usb flash drive
Message-Id: <1110809417.033272.249540@g14g2000cwa.googlegroups.com>
I already posted this but the the subject line
needed work.
I want to install perl on my portable usb flash
drive. When using it on a WIN machine all I plan
on doing is including perl/bin in the path using a
short little perlcfg.bat. The drive letter will
vary from box to box.
Anything else? (.pl assoc already suggested)
I see quite a few entries in the registry. Hope
they are not required. .... damn registry.
------------------------------
Date: 14 Mar 2005 15:59:02 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: install perl on usb flash drive
Message-Id: <Xns96196FBC1A2B0asu1cornelledu@132.236.56.8>
vbhelpski@yahoo.com wrote in news:1110809417.033272.249540
@g14g2000cwa.googlegroups.com:
> I already posted this but the the subject line
> needed work.
And you have already received reasonable responses.
Why start another thread?
Are we going to have to see your posts until you have decided that your
subject line is perfect?
Maybe the reason you are not getting any more responses is that there isn't
much to say about it.
> Anything else? (.pl assoc already suggested)
That is not smart. There is no guarantee that the drive letter where the
perl binary is located will be the same each time you insert the flash
drive.
Sinan
------------------------------
Date: 14 Mar 2005 09:19:01 -0800
From: vbhelpski@yahoo.com
Subject: Re: install perl on usb flash drive
Message-Id: <1110820741.278774.186460@g14g2000cwa.googlegroups.com>
Sinan, your concern about my post is appreciated.
Thank you for it. Thank you for taking the time
to set me stright. Again I really appreciate it.
Really! Again, thank you.
A. Sinan Unur wrote:
> vbhelpski@yahoo.com wrote in news:1110809417.033272.249540
> @g14g2000cwa.googlegroups.com:
>
> > I already posted this but the the subject line
> > needed work.
>
> And you have already received reasonable responses.
>
> Why start another thread?
>
> Are we going to have to see your posts until you have decided that
your
> subject line is perfect?
>
> Maybe the reason you are not getting any more responses is that there
isn't
> much to say about it.
>
> > Anything else? (.pl assoc already suggested)
>
> That is not smart. There is no guarantee that the drive letter where
the
> perl binary is located will be the same each time you insert the
flash
> drive.
>
> Sinan
------------------------------
Date: 14 Mar 2005 11:31:24 -0800
From: "Justin" <justin.devine@gmail.com>
Subject: ISS 5 Perl CGi script and 400 Bad Request Error
Message-Id: <1110828684.432172.59100@o13g2000cwo.googlegroups.com>
Hi. I am running a CGI script on an IIS 5 server and am having some
difficulty. THe name of the script is LUCI (it is a tex-only parser
for web sites), you can find it at luci.sourceforge.net of
www.sourceforge.net/proejcts/luci for source. I believe I have
configured everything properly. The script works on the
"default_target" meaning the URL that is set in the configuration file.
However when attempting to follow any link from that page, the server
returns a 400 Bad Request error. The format of the URL looks like this
http://localhost/luci/luci.cgi/http://www.google.com/
this is supposed to parse www.google.com and return it as a text only
page.
You can also see a working copy of this script and its correct behavior
at https://www.unb.ca/sweb/parser/luci.cgi
Please help.
------------------------------
Date: Mon, 14 Mar 2005 22:38:32 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: ISS 5 Perl CGi script and 400 Bad Request Error
Message-Id: <Xns9619B37958096asu1cornelledu@127.0.0.1>
"Justin" <justin.devine@gmail.com> wrote in news:1110828684.432172.59100
@o13g2000cwo.googlegroups.com:
> Hi. I am running a CGI script on an IIS 5 server and am having some
> difficulty. THe name of the script is LUCI (it is a tex-only parser
> for web sites), you can find it at luci.sourceforge.net of
> www.sourceforge.net/proejcts/luci for source.
This is not the place to get support for web servers or applications. The
purpose of this forum is to discuss Perl programming questions.
You can contact Microsoft or the people who wrote LUCI with your
configuration questions.
Sinan.
------------------------------
Date: Mon, 14 Mar 2005 19:44:41 +0100
From: peter pilsl <pilsl@goldfisch.at>
Subject: Re: printing to xls with Unicode encoding character
Message-Id: <4235dbd2$3@e-post.inode.at>
sam wrote:
>>
> Thanks for the code. May I ask what is goldfisch::tt2?
>
its a template-engine based on TemplateToolkit2 that runs under mod_perl
and provides many project-specific data (that is stored in a
sql-database and read then the module is loaded by apache on startup and
then shared between all the threads). Some of this data needs to be
exported to excel for translation and so I use goldfisch::tt2 for
reading from the database, cause its very convinient.
The module is very project-specific and strictly private :)
you can take a sneak-preview to the whole project at
http://tt2.adulteducation.at/6m/
or the almost ready english version at
http://tt2.adulteducation.at/6m/en
comments welcome and completely OT here ;)
;)
best,
peter
--
http://www2.goldfisch.at/know_list
------------------------------
Date: Mon, 14 Mar 2005 18:56:57 +0000
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: printing to xls with Unicode encoding character
Message-Id: <Pine.LNX.4.61.0503141854310.17934@ppepc56.ph.gla.ac.uk>
On Mon, 14 Mar 2005 jmcnamara@cpan.org wrote:
> The program will work on Windows without -C. So I guess that it is a
> red-herring (at least on more recent perls):
Thanks - then I offer my apologies to the questioner for giving
a misleading answer.
> From perlrun:
> In Perls earlier than 5.8.1 the -C switch was a Win32-only
> switch that enabled the use of Unicode-aware "wide system
> call" Win32 APIs. This feature was practically unused,
> however, and the command line switch was therefore "recycled".
Oh yes, so it does. But that prompts the inevitable question as to
how Win32 now controls the choice of Win32 APIs ...?
------------------------------
Date: 14 Mar 2005 10:10:04 -0800
From: lqueryvg@gmail.com (john)
Subject: problem writing to stdin of child process
Message-Id: <9190653e.0503141010.cd72f9d@posting.google.com>
Hello everyone,
I have a program which forks multiple children and needs to have
bidirectional communication with each child. Each child needs to use
STDIN and STDOUT to talk back to the parent.
The problem is that I'm having trouble connecting the pipe to STDIN of
the child. I've tried various approaches. A simple testcase is below.
In this case, the child seems to read the number (I think) of the pipe
file descriptor rather than the string I send down the pipe.
perl -v shows...
This is perl, v5.8.2 built for aix-thread-multi
Can anyone tell me where I'm going wrong ?
Thanks in advance.
#!/usr/bin/perl
use strict;
use warnings;
use IO::Handle;
use IO::Pipe;
my $cr = IO::Handle->new(); # child reader
my $pw = IO::Handle->new(); # child writer
new IO::Pipe($cr, $pw) or die 'pr/cw pipe';
my $pid = fork();
if ($pid > 0) {
# Parent
print {$pw} "hello!\n"; # sending to the child
close($pw);
} else {
# Child
# Connect stdin to pipe
close($pw);
my $fd = fileno($cr);
open(my $stdin, "<", \$fd) or die "STDIN open: $!";
*STDIN = $stdin;
my $line = <STDIN>; # hopefully reading from the parent
chomp $line;
print "child received: ($line)\n";
close($cr);
exit(0);
}
wait;
------------------------------
Date: Mon, 14 Mar 2005 11:40:33 -0600
From: Shashank Khanvilkar <shashank@mia.ece.uic.edu>
Subject: replace multiple spaces between words with single space.
Message-Id: <d14iaq$d4i$1@newsx.cc.uic.edu>
Hi,
Suppose I have a variable defined as:
$a = "This is a good example";
Note that there are multiple blanks between the words.
If i want to convert the above string to
$b = "This is a good example"
Is there any shortcut to do the above.
I know the long way as
@a_T = split(/\s/, $a);
foreac $i (@a_T){
if ($i){
$b = $b.$i." ";
}
}
I want to use substitute but canot seem to get it right..
Thanks for any help
Shashank
------------------------------
Date: 14 Mar 2005 17:52:13 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: replace multiple spaces between words with single space.
Message-Id: <d14j0d$50n$1@canopus.cc.umanitoba.ca>
In article <d14iaq$d4i$1@newsx.cc.uic.edu>,
Shashank Khanvilkar <shashank@mia.ece.uic.edu> wrote:
:Suppose I have a variable defined as:
:$a = "This is a good example";
:Note that there are multiple blanks between the words.
:If i want to convert the above string to
:$b = "This is a good example"
:Is there any shortcut to do the above.
($b = $a) =~ s/ +/ /g;
Or if you want to generalize this a bit,
($b = $a) =~ s/\s+/ /g;
\s matches whitespace (includes tabs and various non-ASCII whitespace.)
The + modifier means "one or more of the previous group".
The trailing g means "global replace" -- that is, do for all occurances
in the input string.
The other trick is the ($b = $a). If you were to use
$b = $a =~ s/\s+/ /g;
then $b would be assigned the result of the =~ operation; in a scalar
context, =~ with a substitution returns the number of substitutions made,
so $b would end up as a count instead of as the new string. The
($b = $a) part causes the assignment to be done first, and then the =~
acts upon the string so created.
--
Warning: potentially contains traces of nuts.
------------------------------
Date: 14 Mar 2005 17:54:59 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: replace multiple spaces between words with single space.
Message-Id: <Xns96198364CE05Dasu1cornelledu@132.236.56.8>
Shashank Khanvilkar <shashank@mia.ece.uic.edu> wrote in news:d14iaq$d4i$1
@newsx.cc.uic.edu:
> Suppose I have a variable defined as:
Let's suppose.
> $a = "This is a good example";
It is probably not a good idea to use $a and $b. See perldoc -f sort.
> Note that there are multiple blanks between the words.
> If i want to convert the above string to
> $b = "This is a good example"
Ditto.
> I know the long way as
use strict;
use warnings;
> @a_T = split(/\s/, $a);
> foreac $i (@a_T){
> if ($i){
> $b = $b.$i." ";
> }
> }
Please post real code.
syntax error at v.pl line 2, near "){"
Execution of v.pl aborted due to compilation errors.
Have you read the relevant section in perldoc perlop?
use strict;
use warnings;
my $src = q{This is a good example};
my $dest;
$dest = join ' ', split /\s+/, $src;
print "$dest\n";
($dest = $src) =~ s/\s+/ /g;
print "$dest\n";
Sinan
------------------------------
Date: Mon, 14 Mar 2005 18:59:14 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: replace multiple spaces between words with single space.
Message-Id: <6alZd.34241$KI2.24839@clgrps12>
Shashank Khanvilkar wrote:
> Suppose I have a variable defined as:
>
> $a = "This is a good example";
>
> Note that there are multiple blanks between the words.
> If i want to convert the above string to
> $b = "This is a good example"
>
> Is there any shortcut to do the above.
( $b = $a ) =~ y/ //s;
John
--
use Perl;
program
fulfillment
------------------------------
Date: 14 Mar 2005 10:25:43 -0800
From: feedbackzz@yahoo.com
Subject: SERIOUS MONEY OPPORTUNITY-$5 INVESTMENT-HIGH RESPONSE RATE-QUICK RETURNS
Message-Id: <1110824743.403412.204770@z14g2000cwz.googlegroups.com>
Follow the directions below and you could
have $5000 in your PayPal account in 2 weeks.
There is a very high response rate in this
program because of its low investment, high
yields, and quick return. If you are a skeptic
and doubt that the program will work, I urge
you to give it a try anyway! It REALLY WORKS-
that is why so many thousands are involved in
programs like it. Don't miss this chance.
If you achieve only moderate success, your
PayPal account will still have several hundred
dollars in it within the next couple weeks.
If you actively promote the program, you could
soon have $8,000 in your PayPal account.
SIMPLE: All you need is $5 and a free PayPal
account. Pay $5 to one person.
SECURE: PayPal (BBB member) handles all
transactions. No one sees your bank or credit
card information.
LEGAL: See Title 18, Section 1302 and 1341,
US Postal and Lottery Laws.
The details of this business make it legitimate.
You are using the Internet to advertise your
business opportunity. You have a mail order
business that collects email addresses from
people interested in home-based online business.
You provide a service-mailing list membership-
in return for a small fee. Treat your mailing
list as a business. Keep accurate records,
declare your income, and pay income tax on it.
INSTRUCTIONS
STEP 1: COPY and PASTE this letter onto a
blank notepad file. SAVE as a TEXT FILE.
Keep it for the next time you need the
program.
STEP 2: Get a free PayPal account
(5 minutes setup time) at www.paypal.com.
Register for a PREMIER account (not a
PERSONAL) so that others can send money
to your account.
STEP 3: Using your PayPal account, send $5
(US DOLLARS) to the email address (PayPal
account) in position #1 of the list below.
PayPal will ask for a payment type-select
SERVICE. In the SUBJECT area, enter
"Please add me to your mailing list"
(this is very important). If you prefer
that your email address not be given to
other mailing list businesses, enter
"Please add me ONLY to your mailing list"
in the SUBJECT area. In order to send
money, you can deposit $5 into your PayPal
account with your own credit card, use
your bank account, or register for the
PayPal credit card.
IMPORTANT: IN ORDER FOR YOUR BUSINESS
TO WORK, YOU MUST BE HONEST AND SEND $5.
The mailing list business remains successful
due to the honesty and integrity of those
involved. $5 is a very small investment,
especially when you are about to receive
many times that much! If we are all honest,
we will all make money.
STEP 4: After you send your $5, remove the
address from position #1 of the list below.
Put the address in position #2 into position
#1. Put your own email address (PayPal
account) in position #2. Some engines will
automatically hide part of an email address
when the letter is posted in a newsgroup.
It may look like this:
yournam...@wherever.com
To avoid this complication, enter your
email address using 2 separate lines,
like this:
2) yourname (press ENTER on your keypad)
@wherever.com
(If you ever encounter the dots, click on
SHOW OPTIONS at the top of the letter, then
click on REPLY. Scroll down through the
original letter to find the full addresses.)
Both people on your list have already bought
mailing list memberships for $5! The program
is working! Note: If you put your name in
position #1, you will not receive money
from the hundreds that other members find.
CURRENT PAYPAL ACCOUNTS:
1) cwhatton22
@charter.net
2) feedbackzz
@yahoo.com
STEP 5: COPY and PASTE this letter (with
your address in position #2) in emails to
at least 60 newsgroups, chat sites,
discussions, message boards, etc. It takes
less than a minute to post the letter. The
more you post, the more money you can make.
People will see the letter heading as they
scroll through the list of postings in a
particular group. PASTE the heading below
into the subject area of your email (you
can also write your own heading):
SERIOUS MONEY OPPORTUNITY-
$5 INVESTMENT-HIGH RESPONSE RATE-
QUICK RETURNS
Use the search engines (Internet Explorer,
yahoo.com, google.com, altavista.com,
excite.com) to find sites. Search for
moneymaking forums, moneymaking message
board, money chat, employment message
board, business message board, business
discussions, etc. You can create your own
free webpage (try webspawner.com,
cmlb.net), then post links to your site.
Try posting a notice on community and
college bulletin boards to direct people
to your webpage.
THIS BUSINESS WORKS
When your name reaches position #1 (usually
in less than a week) it will be your turn to
receive $5 deposits. If you personally find 20
interested people, and they each find 20, you
make $2000. If you find 40 people, and they
each find 20, you make $4000. Remember that
the response rate is very high. Since there
are only 2 names on the list, you can expect
80% of your profits within 2 weeks.
Participants who actively promote their mailing
list average between $5,000 and $8,000 and
receive the funds within 3 weeks.
Relieve your financial stress NOW!
Become a part of the mail order business and
help people to help people.
This program is about helping each other!
------------------------------
Date: 14 Mar 2005 06:27:57 -0800
From: "jl_post@hotmail.com" <jl_post@hotmail.com>
Subject: Re: unix pipes to perl scripts
Message-Id: <1110810477.614786.48910@o13g2000cwo.googlegroups.com>
trt. wrote:
>
> Got a problem piping command output to a perl script,
> in the test below the loop accepts the piped files but
> it also interferes with my STDIN!
>
> ===test=============================
> $ls -1 *.cfg | ./pp
> file: hosts.cfg
> file: pseries.cfg
>
> type something : you typed :
> ===test=============================
>
> I do not get the chance to type something in after
> "type something"...
>
> Do i have to flush some variable inbetween the foreach
> loop and <STDIN>?
> Is looping trough <ARGV> or <> the best way to catch
> piped input?
>
> ===code=============================
> $cat ./pp
> #!/usr/bin/perl
>
> while ( <> ) {
> print "file: $_";
>
> };
>
> print "\ntype something : ";
> $answer = <STDIN>;
> print "you typed : $answer \n";
> ===code=============================
Try adding the lines:
$| = 1; # autoflush
open(STDIN, "</dev/tty") or die $!;
right before the line that prints "type something". This will make any
subsequent reads from STDIN read from the terminal (and not from the
pipe).
I hope this helps!
-- Jean-Luc
------------------------------
Date: 14 Mar 2005 06:33:06 -0800
From: "trt." <therealtroll@yahoo.com>
Subject: Re: unix pipes to perl scripts
Message-Id: <1110810786.143594.126960@f14g2000cwb.googlegroups.com>
I tried using $|=1 but opening the STDIN filehandle for /dev/tty did do
the trick -- nice, thank you!
------------------------------
Date: Mon, 14 Mar 2005 15:33:53 +0100
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: unix pipes to perl scripts
Message-Id: <d147co$q5i$1@nntp.fujitsu-siemens.com>
trt. wrote:
> Got a problem piping command output to a perl script, in the test below=
> the loop accepts the piped files but it also interferes with my STDIN!
>=20
> =3D=3D=3Dtest=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
> $ls -1 *.cfg | ./pp
> file: hosts.cfg
> file: pseries.cfg
>=20
> type something : you typed :
> =3D=3D=3Dtest=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> I do not get the chance to type something in after "type something"...
>=20
> Do i have to flush some variable inbetween the foreach loop and
> <STDIN>?
> Is looping trough <ARGV> or <> the best way to catch piped input?
The STDIN of your pp script is redirected from the keyboard to the=20
STDOUT of the ls command. It is not automagically reconnected to the=20
keyboard once the ls command has terminated.
It would not be a good idea to reconnect to the keyboard, as quite a lot =
of scripts depend upon pipelines to perform certain tasks (this is a=20
design feature of the UN*X/Linux architecture).
If you must read some more input from the keyboard, you can open /dev/tty=
:
#!/usr/bin/perl
while ( <> ) {
print "file: $_";
};
open STDIN, '<', '/dev/tty'; #################################
print "\ntype something : ";
$answer =3D <STDIN>;
print "you typed : $answer \n";
Note that you'll get problems with buffering, though.
Josef
--=20
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
Date: Mon, 14 Mar 2005 10:40:25 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: unix pipes to perl scripts
Message-Id: <adudnYBg84X0LajfRVn-2w@comcast.com>
trt. wrote:
> Got a problem piping command output to a perl script, in the test below
> the loop accepts the piped files but it also interferes with my STDIN!
>
> ===test=============================
> $ls -1 *.cfg | ./pp
> file: hosts.cfg
> file: pseries.cfg
>
> type something : you typed :
> ===test=============================
>
> I do not get the chance to type something in after "type something"...
Well, of course this interferes with your STDIN. You told it to. The
pipeline you set up in the shell command made the output of "ls -l *.cfg"
STDIN for pp, not your terminal. <> reads STDIN if you don't give the perl
script any arguments, which you did not. So it reads STDIN to end of
file (which happens when ls -l *.cfg is finished). Then when you try
to read STDIN again, it's already reached end of file, so it just
returns with no data.
>
> Do i have to flush some variable inbetween the foreach loop and
> <STDIN>?
> Is looping trough <ARGV> or <> the best way to catch piped input?
>
> ===code=============================
> $cat ./pp
> #!/usr/bin/perl
>
> while ( <> ) {
> print "file: $_";
>
> };
>
> print "\ntype something : ";
> $answer = <STDIN>;
> print "you typed : $answer \n";
> ===code=============================
>
> nb: also tried open FH, "-|" ... close FH, no difference.
>
> thanks!
--
Christopher Mattern
"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
------------------------------
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 V10 Issue 7880
***************************************