[23608] in Perl-Users-Digest
Perl-Users Digest, Issue: 5815 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 17 06:05:44 2003
Date: Mon, 17 Nov 2003 03:05:07 -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, 17 Nov 2003 Volume: 10 Number: 5815
Today's topics:
Re: "tree" view of directory (Peter J. Acklam)
Re: access win32 from unix? <bik.mido@tiscalinet.it>
Re: bit sequence match <edady2002@yahoo.com>
Re: Calling a different shell than the inherited one <admin@asarian-host.net>
Re: function to return its argument literally - possibl <ubl@schaffhausen.de>
Re: Help <lmai@mytum.de>
Include &/or option in flatfile db query.. (Oeln)
installing perl <kingkongthe2nd@hayooo.com>
Re: installing perl (Rafael Garcia-Suarez)
Re: installing perl <tassilo.parseval@rwth-aachen.de>
Re: installing perl <tassilo.parseval@rwth-aachen.de>
Re: installing perl <kingkongthe2nd@hayooo.com>
Re: Learn Regex or Perl Frist? <krahnj@acm.org>
Re: Learn Regex or Perl Frist? <uri@stemsystems.com>
Re: Learn Regex or Perl Frist? <krahnj@acm.org>
Re: MIME::Lite Attaching a file (William Herrera)
Re: MIME::Lite Attaching a file <provicon@earthlink.net>
Re: MIME::Lite Attaching a file (William Herrera)
SASL Authentication <provicon@earthlink.net>
Re: woodrow, isn't exactly rocket science <afizbogi@wuhter.org>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 17 Nov 2003 07:18:34 +0100
From: pjacklam@online.no (Peter J. Acklam)
Subject: Re: "tree" view of directory
Message-Id: <8ymfcybp.fsf@online.no>
tadmc@augustmail.com (Tad McClellan) wrote:
> Jeff Thies <nospam@nospam.net> wrote:
>
> > I'd like to have a tree like listing of a directories
> > contents and it's subdirectories.
>
> I snatched this one when I saw Tushar Samant post it here years ago:
>
> find . -print | sed -e 's,[^/]*/\([^/]*\)$,`--\1,' -e 's,[^/]*/,| ,g'
It's no good. Try
$ mkdir -p a/b/c/d a/e
$ find a -print | sed -e 's,[^/]*/\([^/]*\)$,`--\1,' -e 's,[^/]*/,| ,g'
a
`--b
| `--c
| | `--d
`--e
it should have printed
a
+---b
| `---c
| `---d
`---e
Peter
--
#!/local/bin/perl5 -wp -*- mode: cperl; coding: iso-8859-1; -*-
# matlab comment stripper (strips comments from Matlab m-files)
s/^((?:(?:[])}\w.]'+|[^'%])+|'[^'\n]*(?:''[^'\n]*)*')*).*/$1/x;
------------------------------
Date: Mon, 17 Nov 2003 08:54:44 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: access win32 from unix?
Message-Id: <eougrv0nbr4kskeuthj83j36so3b6vf2ko@4ax.com>
On Sun, 16 Nov 2003 02:13:47 -0000, Mike <mikee@mikee.ath.cx> wrote:
[slightly edited for clarity(*)]
>>>> You can run most of the CPAN modules on Win2k/winxp.
[snip]
>> I would presume standard unix commands like 'df' are available with cygwin to show disk space.
>> The output from df is easily parseable.
>
>I don't want to use cygwin. I want to issue a command on the
>unix server that sends a request to the windows box asking
>it it's disk space, it's event log entries, etc. I am searching
>for something I can use from unix to directly query the
>os facilities on windows.
I do *not* have a clue about your problem... BUT! if you want to run
something on the unix *server* it seems natural that (i) "something"
should be a server and (ii) you will need a client running on the
Windows boxes to gather the info for you. I seriously doubt that there
exists something like "directly querying the os facilities on
windows"...
At this point the suggestions you received become sensible indeed:
you'd probably need either some Win32-specific module or cygwin stuff
for the clients.
(*) In the part quoted from another poster, actually
Michele
--
# This prints: Just another Perl hacker,
seek DATA,15,0 and print q... <DATA>;
__END__
------------------------------
Date: Mon, 17 Nov 2003 21:21:49 +1100
From: Edo <edady2002@yahoo.com>
Subject: Re: bit sequence match
Message-Id: <3FB8A13D.8090909@yahoo.com>
my @k1 = sort {$a <=> $b} keys %h1;
my @k2 = sort {$a <=> $b} keys %h2;
my $look_for = pack('(B2)*' => @h1{ @k1 });
my $look_in = pack('(B2)*' => @h2{ @k2 });
#why can't we replace the above 2 lines with
my $lookfor = join "", @h1{ @k1 };
my $lookin = join "", @h2{ @k2 };
#don't these do the same thing?
my @results;
while( $lookin =~ /(?=\Q$lookfor\E)/g ) {
push @results,
{
map { $_ => $h2{$_} }
@k2[ $-[0] .. $-[0]+@k1-1 ]
};
}
and could you place explain
map { $_ => $h2{$_} }
@k2[ $-[0] .. $-[0]+@k1-1 ]
};
thanks
------------------------------
Date: Mon, 17 Nov 2003 11:29:16 +0100
From: "Mark" <admin@asarian-host.net>
Subject: Re: Calling a different shell than the inherited one
Message-Id: <rbOdncOff7KfPiWiRVn-sA@giganews.com>
<dn_perl@hotmail.com> wrote in message
news:97314b5b.0311161855.214ef879@posting.google.com...
> I often use C-shell for reasons beyond my control.
>
> I want to call 'sqlplus' from within a perl script while
> using c-shell. But I want the sqlplus to run in k-shell
> or bash-shell. How can I do this? This is just an academic doubt.
>
> If I use :
> system("sqlplus username/password << EOH");
> sqlplus statement one
> sqlplus statement two
> EOH
>
> ... then won't the sqlplus run within the inherited C shell?
> Or is there no such thing as the called sqlplus (or any other
> called command) running within some shell?
Have you tried setting an environment variable before making the system
call? Like,
$ENV{'SHELL'} = '/bin/bash';
That might do it.
- Mark
------------------------------
Date: Mon, 17 Nov 2003 09:46:48 +0100
From: Malte Ubl <ubl@schaffhausen.de>
Subject: Re: function to return its argument literally - possible solution
Message-Id: <bpa508$jcc$1@news.dtag.de>
Eric Smith wrote:
> Following up mu own post -
>
> funny how posting a question makes you focus more clearly:
> Maybe this is a solution
No. For lazy evaluation use closures. The example code you provided
would work perfectly with a regular function call, though.
malte
------------------------------
Date: Mon, 17 Nov 2003 10:44:39 +0000 (UTC)
From: Lukas Mai <lmai@mytum.de>
Subject: Re: Help
Message-Id: <bpa8qn$3tsg1$1@sunsystem5.informatik.tu-muenchen.de>
"Jürgen Exner" <jurgenex@hotmail.com> wrote:
> I may be wrong but IFAIK there is no browser that could execute a Perl
> program.
w3m has a "local CGI" feature[1], so there is at least one browser that
can execute Perl. ;-)
HTH, Lukas
[1] http://w3m.sourceforge.net/MANUAL#LocalCGI
------------------------------
Date: 16 Nov 2003 22:54:31 -0800
From: ohmy9od@yahoo.com (Oeln)
Subject: Include &/or option in flatfile db query..
Message-Id: <ffde43bc.0311162254.298c4521@posting.google.com>
I've got a flat text file db (tab delimited) & a form that lets one
query it online. In its current incarnation, it only lets one input a
term to look for in the file, & outputs the lines in the file which
include that term. If the input 'term' incldes ' ', it considers it
one term. I'd like to increase its functionality by including the &/or
option (&, of course, therefore identifying each term input to the
form individually).
The form that includes the query option:
<form method="post" action="cgi-bin/odb.pl">
<input type="text" name="input">
<input type="hidden" name="oper" value="query">
<input type="submit" value="Okay">
<input type="reset" value="Clear">
</form>
In odb.pl I've got the following in order to parse the form itself:
if ($ENV{'REQUEST_METHOD'} eq 'POST') {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$contents{$name} = $value;
}
}
I've then got, in order to do the query, the following:
if ($contents{'oper'} eq "query") {
open (FILE, "$odb") || do {&no_open;};
&output_header;
&output_open;
$count=0;
@ordered = sort(<FILE>);
foreach $pair (@ordered) {
if ($pair =~ /$contents{'input'}/gi) {
$count++;
@item = split(/\t/, $pair);
&output_item;
}
}
if ($count==0) {
# print " ";
}
close(FILE);
&output_close;
&output_footer;
exit;
}
It works fine like this: I've got no issues with it other than it's
lack of the &/or option. In order to offer this, I'd obviously include
in the form itself an 'option' field, in order to let one indicate
&/or: i.e.,
<form method="post" action="cgi-bin/odb.pl">
<input type="text" name="input">
<input type="radio" name="option" value="and">&
<input type="radio" name="option" value="or">or
<input type="hidden" name="oper" value="query">
<input type="submit" value="Okay">
<input type="reset" value="Clear">
</form>
I've gone over the original code I've got, & changed it to be the
following instead:
if ($contents{'oper'} eq "query") {
@inputs = split(/\s+/, $contents{'input'});
# $odb file location is identified elsewhere
open(FILE,"$odb") || do {&no_open;};
@ordered = sort(<FILE>);
foreach $pair (@ordered) {
# &
if ($contents{'option'} eq "and") {
foreach $input (@inputs) {
if (!($pair =~ /$input/i)) {
$include{$pair} = 'no';
last;
} else {
$include{$pair} = 'yes';
}
}
# or
} elsif ($contents{'option'} eq "or") {
foreach $input (@inputs) {
if ($pair =~ /$input/i) {
$include{$pair} = 'yes';
last;
} else {
$include{$pair} = 'no';
}
}
}
}
&output_header;
&output_open;
foreach $key (keys %include) {
if ($include{$key} eq 'yes') {
$count++;
@item = split(/\t/, $pair);
&output_item;
}
}
if ($count == 0) {
# print " ";
}
&output_close;
&output_footer;
close(FILE);
exit;
}
I'd imagine this would identify the individual terms in the 'input'
field, & then, for each line in the file it would look for an
occurence of one of the input terms. If the option indicated were
'and', it would look for an instance of a term not incl. in the line &
if it found one, it would not include that line in output (the
opposite would then occur for 'or') in order for it to be a little bit
faster than looking for each term. I guess for now though I'm less
interested in it being fast than in getting it to work.
The interesting thing is this: I've got the following it &output_item:
sub output_item {
print <<"OUTPUT";
<tr>
<td>$item[0]</td>
<td>$item[1]</td>
<td>$item[2]</td>
</tr>
OUTPUT
}
In the output I'm getting now, there is an increase in table cells if
I've input a term that ought to be found in the text file. If I input
a term that it won't find, it gives me no table cells. I'm getting
this impression by looking at the table border outline cells in the
output - it's like it's finding the items in the file & outputting
empty table cells like I've indicated if it finds a term; but it's not
including the text in $item[0], $item[1], etc. I've got no idea why,
or where the issue is, if I'm overlooking the obviuos or not..
- Noel
------------------------------
Date: Mon, 17 Nov 2003 20:27:54 +1100
From: King <kingkongthe2nd@hayooo.com>
Subject: installing perl
Message-Id: <3FB8949A.7020707@hayooo.com>
Hello
I am installing a perl5.8.2 on my debian system and having these problems
after downloanding and untaring the file
# cd /home/username/perl-5.8.2
# sh Configure -de
.
.
.
Build Perl for multiplicity? [n]
Hmm... Looks kind of like a Version 7 system, but we'll see...
Congratulations. You aren't running Eunice.
It's not Xenix...
Nor is it Venix...
Use which C compiler? [cc]
Configure: cc: command not found
Uh-oh, the C compiler 'cc' doesn't seem to be working.
Configure: gcc: command not found
Configure: cc: command not found
Uh-oh, the C compiler 'cc' doesn't seem to be working.
You need to find a working C compiler.
Either (purchase and) install the C compiler supplied by your OS vendor,
or for a free C compiler try http://gcc.gnu.org/
I cannot continue any further, aborting.
#
# which gcc-3.0
/usr/bin/gcc-3.0
# which cc
# which gcc
#
how do I fix it?
should I
#ln -sf /usr/bin/cc /usr/bin/gcc-3.0 ?
thanks
------------------------------
Date: 17 Nov 2003 09:50:21 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: installing perl
Message-Id: <slrnbrh6am.8ep.rgarciasuarez@rafael.serd.lyon.hexaflux.loc>
King wrote:
>Use which C compiler? [cc]
>Configure: cc: command not found
>Uh-oh, the C compiler 'cc' doesn't seem to be working.
>Configure: gcc: command not found
>Configure: cc: command not found
>Uh-oh, the C compiler 'cc' doesn't seem to be working.
>You need to find a working C compiler.
>Either (purchase and) install the C compiler supplied by your OS vendor,
>or for a free C compiler try http://gcc.gnu.org/
>I cannot continue any further, aborting.
>#
>
># which gcc-3.0
>/usr/bin/gcc-3.0
># which cc
># which gcc
>#
>
>how do I fix it?
pass the -Dcc=/usr/bin/gcc-3.0 to your Configure command-line.
--
Unary is not *NIX
------------------------------
Date: 17 Nov 2003 09:50:59 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: installing perl
Message-Id: <bpa5m3$e3f$1@nets3.rz.RWTH-Aachen.DE>
Also sprach King:
> I am installing a perl5.8.2 on my debian system and having these problems
> after downloanding and untaring the file
> # cd /home/username/perl-5.8.2
> # sh Configure -de
> .
> .
> .
> Build Perl for multiplicity? [n]
>
> Hmm... Looks kind of like a Version 7 system, but we'll see...
>
> Congratulations. You aren't running Eunice.
>
> It's not Xenix...
>
> Nor is it Venix...
> Use which C compiler? [cc]
> Configure: cc: command not found
> Uh-oh, the C compiler 'cc' doesn't seem to be working.
> Configure: gcc: command not found
> Configure: cc: command not found
> Uh-oh, the C compiler 'cc' doesn't seem to be working.
> You need to find a working C compiler.
> Either (purchase and) install the C compiler supplied by your OS vendor,
> or for a free C compiler try http://gcc.gnu.org/
> I cannot continue any further, aborting.
> #
>
> # which gcc-3.0
> /usr/bin/gcc-3.0
> # which cc
> # which gcc
> #
>
> how do I fix it?
> should I
> #ln -sf /usr/bin/cc /usr/bin/gcc-3.0 ?
Preferably, yes, since Perl is not the only program that expects to find 'cc'
somewhere in the path.
If you don't want that for some reasons, enter '/usr/bin/gcc-3.0' when
the configure scripts ask you which C compiler to use. To run the script
interactively, do a 'sh Configure' without any arguments. Somthing like
sh Configure -r -Dcc=/usr/bin/gcc-3.0
should also work.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: 17 Nov 2003 10:00:51 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: installing perl
Message-Id: <bpa68j$emb$1@nets3.rz.RWTH-Aachen.DE>
Also sprach King:
> Rafael Garcia-Suarez wrote:
>> King wrote:
>>
>>>Use which C compiler? [cc]
>>>Configure: cc: command not found
>>>Uh-oh, the C compiler 'cc' doesn't seem to be working.
>>>Configure: gcc: command not found
>>>Configure: cc: command not found
>>>Uh-oh, the C compiler 'cc' doesn't seem to be working.
>>>You need to find a working C compiler.
>>>Either (purchase and) install the C compiler supplied by your OS vendor,
>>>or for a free C compiler try http://gcc.gnu.org/
>>>I cannot continue any further, aborting.
>>>#
>>>
>>># which gcc-3.0
>>>/usr/bin/gcc-3.0
>>># which cc
>>># which gcc
>>>#
>>>
>>>how do I fix it?
>>
>>
>> pass the -Dcc=/usr/bin/gcc-3.0 to your Configure command-line.
>>
>
> a newbi question,
> is that what you mean?
> # sh Configure -de -Dcc=/usr/bin/gcc-3.0
What happens when you try?
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: Mon, 17 Nov 2003 21:32:07 +1100
From: King <kingkongthe2nd@hayooo.com>
Subject: Re: installing perl
Message-Id: <3FB8A3A7.3040606@hayooo.com>
Tassilo v. Parseval wrote:
> Also sprach King:
>
>
>>I am installing a perl5.8.2 on my debian system and having these
problems
>>after downloanding and untaring the file
>># cd /home/username/perl-5.8.2
>># sh Configure -de
>>.
>>.
>>.
>>Build Perl for multiplicity? [n]
>>
>>Hmm... Looks kind of like a Version 7 system, but we'll see...
>>
>>Congratulations. You aren't running Eunice.
>>
>>It's not Xenix...
>>
>>Nor is it Venix...
>>Use which C compiler? [cc]
>>Configure: cc: command not found
>>Uh-oh, the C compiler 'cc' doesn't seem to be working.
>>Configure: gcc: command not found
>>Configure: cc: command not found
>>Uh-oh, the C compiler 'cc' doesn't seem to be working.
>>You need to find a working C compiler.
>>Either (purchase and) install the C compiler supplied by your OS vendor,
>>or for a free C compiler try http://gcc.gnu.org/
>>I cannot continue any further, aborting.
>>#
>>
>># which gcc-3.0
>>/usr/bin/gcc-3.0
>># which cc
>># which gcc
>>#
>>
>>how do I fix it?
>>should I
>>#ln -sf /usr/bin/cc /usr/bin/gcc-3.0 ?
>
>
> Preferably, yes, since Perl is not the only program that expects to
find 'cc'
> somewhere in the path.
>
good, that is what I want to do
# ln -sf /usr/bin/gcc-3.0 /usr/bin/cc
# sh Configure -de
It's not Xenix...
Nor is it Venix...
Use which C compiler? [cc]
/usr/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status
Uh-oh, the C compiler 'cc' doesn't seem to be working.
/usr/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status
Uh-oh, the C compiler 'cc' doesn't seem to be working.
You need to find a working C compiler.
Either (purchase and) install the C compiler supplied by your OS vendor,
or for a free C compiler try http://gcc.gnu.org/
I cannot continue any further, aborting.
# which cc
/usr/bin/cc
#
still the same problem
# ls -l /usr/bin/ | grep cc
lrwxrwxrwx 1 root root 16 Nov 17 21:08 cc ->
/usr/bin/gcc-3.0
-rwxr-xr-x 1 root root 74056 Apr 8 2002 gcc-3.0
-rwxr-xr-x 1 root root 15647 Apr 8 2002 gccbug-3.0
-rwxr-xr-x 1 root root 3040 Sep 17 06:39 kaccess
-rwxr-xr-x 1 root root 16920 Aug 10 11:18 perlcc
# sh Configure -r -Dcc=/usr/bin/gcc-3.0
Beginning of configuration questions for perl5.
Checking echo to see how to suppress newlines...
...using -n.
The star should be here-->*
First let's make sure your kit is complete. Checking...
Looks good...
Would you like to see the instructions? [n]
Locating common programs...
awk is in /usr/bin/awk.
cat is in /bin/cat.
chmod is in /bin/chmod.
comm is in /usr/bin/comm.
cp is in /bin/cp.
echo is in /bin/echo.
expr is in /usr/bin/expr.
grep is in /bin/grep.
ls is in /bin/ls.
mkdir is in /bin/mkdir.
rm is in /bin/rm.
sed is in /bin/sed.
sort is in /usr/bin/sort.
touch is in /bin/touch.
tr is in /usr/bin/tr.
uniq is in /usr/bin/uniq.
Don't worry if any of the following aren't found...
I don't see Mcc out there, offhand.
ar is in /usr/bin/ar.
I don't see bison out there, either.
I don't see byacc out there, either.
cpp is in /usr/bin/cpp.
I don't see csh out there, either.
date is in /bin/date.
egrep is in /bin/egrep.
I don't see gmake out there, either.
gzip is in /bin/gzip.
I don't see less out there, either.
ln is in /bin/ln.
make is in /usr/bin/make.
more is in /bin/more.
nm is in /usr/bin/nm.
nroff is in /usr/bin/nroff.
I don't see pg out there, either.
test is in /usr/bin/test.
uname is in /bin/uname.
zip is in /usr/bin/zip.
Using the test built into your sh.
Checking compatibility between /bin/echo and builtin echo (if any)...
They are compatible. In fact, they may be identical.
Symbolic links are supported.
Checking how to test for symbolic links...
Your builtin 'test -h' may be broken.
Trying external '/usr/bin/test -h'.
You can test for symbolic links with '/usr/bin/test -h'.
Good, your tr supports [:lower:] and [:upper:] to convert case.
Using [:upper:] and [:lower:] to convert case.
/usr/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status
You need to find a working C compiler.
Either (purchase and) install the C compiler supplied by your OS vendor,
or for a free C compiler try http://gcc.gnu.org/
I cannot continue any further, aborting.
#
------------------------------
Date: Mon, 17 Nov 2003 07:32:54 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Learn Regex or Perl Frist?
Message-Id: <3FB879AF.BA81AAEC@acm.org>
Ben Morrow wrote:
>
> One of the things it can be is a regex, and there is a special
> operator '=~' in Perl which means 'match this regex against this
> string'.
Actually =~ is the binding operator and if used with tr/// there is no
regex involved.
John
--
use Perl;
program
fulfillment
------------------------------
Date: Mon, 17 Nov 2003 08:01:22 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Learn Regex or Perl Frist?
Message-Id: <x7smknjuel.fsf@mail.sysarch.com>
>>>>> "JWK" == John W Krahn <krahnj@acm.org> writes:
JWK> Ben Morrow wrote:
>>
>> One of the things it can be is a regex, and there is a special
>> operator '=~' in Perl which means 'match this regex against this
>> string'.
JWK> Actually =~ is the binding operator and if used with tr/// there is no
JWK> regex involved.
that is a good point that is not mentioned often enough. but what does
this do?
'abc' =~ ( foo() . $bar ) ;
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Mon, 17 Nov 2003 09:24:09 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Learn Regex or Perl Frist?
Message-Id: <3FB893C2.7B9E87B1@acm.org>
Uri Guttman wrote:
>
> >>>>> "JWK" == John W Krahn <krahnj@acm.org> writes:
>
> JWK> Ben Morrow wrote:
> >>
> >> One of the things it can be is a regex, and there is a special
> >> operator '=~' in Perl which means 'match this regex against this
> >> string'.
>
> JWK> Actually =~ is the binding operator and if used with tr/// there is no
> JWK> regex involved.
>
> that is a good point that is not mentioned often enough. but what does
> this do?
>
> 'abc' =~ ( foo() . $bar ) ;
Something similar to:
'abc' =~ /@{[ foo() ]}$bar/ ;
John
--
use Perl;
program
fulfillment
------------------------------
Date: Mon, 17 Nov 2003 05:28:18 GMT
From: wherrera@lynxview.com (William Herrera)
Subject: Re: MIME::Lite Attaching a file
Message-Id: <3fb85bfd.528423572@news2.news.adelphia.net>
On Mon, 17 Nov 2003 04:29:11 GMT, "John B. Kim" <provicon@earthlink.net> wrote:
>Could anyone tell me how I can attach a pdf file through MIME::Lite??
>
>I don't know how I can specify PATH value.. Do I put down the directory
>location of the file I am attaching?? I tried it, but that didn't work.
>
>Any help will be deeply appreciated.. Please help me attach a pdf file
>through MIME::Lite.
>
>Thanks.
>
>
Well, this works usually. Have you RTFM, BTW?
use strict;
use MIME::Lite;
use Net::SMTP;
my $msg = MIME::Lite->new(
From =>'postmaster@deadmail.com',
To =>'hostmaster@deadmail.com',
Subject =>'MIME encoding.',
auth =>"author, 077777",
Data => "Have a look at this IRS PDF" );
$msg->attach(
From =>'postmaster@deadmail.com',
To =>'hostmaster@deadmail.com',
Subject => "A PDF",
Type => 'x-pdf',
Path => "/adobe/pdf/2001 form 1099-int.pdf",
ReadNow => 1,
Filename => "2001 form 1099-int.pdf");
MIME::Lite->send('smtp', 'mymailserver.any . ');
$msg->send();
perl -MCrypt::Rot13 -e "$m=new Crypt::Rot13;$m->charge('WhfgNabgureCreyUnpxre');print $m->rot13;"
------------------------------
Date: Mon, 17 Nov 2003 05:58:04 GMT
From: "John B. Kim" <provicon@earthlink.net>
Subject: Re: MIME::Lite Attaching a file
Message-Id: <MrZtb.3531$sb4.2168@newsread2.news.pas.earthlink.net>
Thank you so much for your reply.
I look at your code, and pretty much understand what is going on, but I have
a few questions on the code you provide me:
auth =>"author, 077777",
I do not understand what value I have to put in for 'auth'.. Is it my
User ID and password??
Path => "/adobe/pdf/2001 form 1099-int.pdf",
ReadNow => 1,
Filename => "2001 form 1099-int.pdf");
I do not understand the part above. I looked at the help file with Perl
MIME::Lite module, but I really could not understand what I have to put
down for Path and Filename.
Suppose my file is 'issue1.pdf' in 'c:\guide' directory. Then what do I
put down as Path and Filename?? Is it going to be:
Path => "c:/guide/issue1.pdf",
Filename => "issue1.pdf?);
And what is 'ReadNow => 1' for??
Also I do not understand the code at the very bottom:
perl -MCrypt::Rot13 -e "$m=new
Crypt::Rot13;$m->charge('WhfgNabgureCreyUnpxre');print $m->rot13;"
You ask me in the beginning whether I have RTFM, BTW? What is that??
Obviously, I don't think I have that.
Thanks.
John
"William Herrera" <wherrera@lynxview.com> wrote in message
news:3fb85bfd.528423572@news2.news.adelphia.net...
> On Mon, 17 Nov 2003 04:29:11 GMT, "John B. Kim" <provicon@earthlink.net>
wrote:
>
> >Could anyone tell me how I can attach a pdf file through MIME::Lite??
> >
> >I don't know how I can specify PATH value.. Do I put down the directory
> >location of the file I am attaching?? I tried it, but that didn't work.
> >
> >Any help will be deeply appreciated.. Please help me attach a pdf file
> >through MIME::Lite.
> >
> >Thanks.
> >
> >
>
> Well, this works usually. Have you RTFM, BTW?
>
> use strict;
> use MIME::Lite;
> use Net::SMTP;
> my $msg = MIME::Lite->new(
> From =>'postmaster@deadmail.com',
> To =>'hostmaster@deadmail.com',
> Subject =>'MIME encoding.',
> auth =>"author, 077777",
> Data => "Have a look at this IRS PDF" );
> $msg->attach(
> From =>'postmaster@deadmail.com',
> To =>'hostmaster@deadmail.com',
> Subject => "A PDF",
> Type => 'x-pdf',
> Path => "/adobe/pdf/2001 form 1099-int.pdf",
> ReadNow => 1,
> Filename => "2001 form 1099-int.pdf");
>
> MIME::Lite->send('smtp', 'mymailserver.any . ');
> $msg->send();
>
>
> perl -MCrypt::Rot13 -e "$m=new
Crypt::Rot13;$m->charge('WhfgNabgureCreyUnpxre');print $m->rot13;"
------------------------------
Date: Mon, 17 Nov 2003 06:10:25 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: Re: MIME::Lite Attaching a file
Message-Id: <3fb86571.530844096@news2.news.adelphia.net>
On Mon, 17 Nov 2003 05:58:04 GMT, "John B. Kim" <provicon@earthlink.net> wrote:
>Thank you so much for your reply.
>
>I look at your code, and pretty much understand what is going on, but I have
>a few questions on the code you provide me:
>
>auth =>"author, 077777",
> I do not understand what value I have to put in for 'auth'.. Is it my
>User ID and password??
>
Yes, though with most smtp servers, it is not used.
>Path => "/adobe/pdf/2001 form 1099-int.pdf",
>ReadNow => 1,
>Filename => "2001 form 1099-int.pdf");
> I do not understand the part above. I looked at the help file with Perl
>MIME::Lite module, but I really could not understand what I have to put
>down for Path and Filename.
> Suppose my file is 'issue1.pdf' in 'c:\guide' directory. Then what do I
>put down as Path and Filename?? Is it going to be:
>
> Path => "c:/guide/issue1.pdf",
> Filename => "issue1.pdf?);
Yes.
>
>And what is 'ReadNow => 1' for??
Tell perl to read the PDF now, not when it is sent.
>
>Also I do not understand the code at the very bottom:
> perl -MCrypt::Rot13 -e "$m=new
>Crypt::Rot13;$m->charge('WhfgNabgureCreyUnpxre');print $m->rot13;"
>
>You ask me in the beginning whether I have RTFM, BTW? What is that??
>Obviously, I don't think I have that.
>
Sorry, just a signature tag, ignore.
---
Use the domain skylightview (dot) com for the reply address instead.
------------------------------
Date: Mon, 17 Nov 2003 05:05:18 GMT
From: "John B. Kim" <provicon@earthlink.net>
Subject: SASL Authentication
Message-Id: <iGYtb.4356$n56.2210@newsread1.news.pas.earthlink.net>
Could someone tell me how I can set SASL Authentication with MIME::Lite??
I am currently testing the code below:
use MIME::Lite;
use Net::SMTP;
$msg = MIME::Lite->new(
From =>'jbyungro@msn.com',
To =>'jbyungro@msn.com',
Subject =>'Helloooooo, nurse!',
auth =>"jbyungro@msn.com, 00715715",
Data =>"How's it goin', eh?"
);
MIME::Lite->send('smtp', 'smtp.email.msn.com');
$msg->send();
When I run the code, I get the error message below:
SMTP MAIL command failed:
5.7.3 Requested action aborted; mailbox unavailable
at mimelitetest.pl line 14..
Any help will be deeply appreciated.
Thansk.
John
------------------------------
Date: Mon, 17 Nov 2003 05:50:02 GMT
From: Abu Ayman Al Siri <afizbogi@wuhter.org>
Subject: Re: woodrow, isn't exactly rocket science
Message-Id: <9BF5CDE0.68959487@news.bexfe.org>
On 17 Nov 2003 05:50:02 GMT, Madeleine E. MacGinley wrote:
>
> Rethink the Cool + the Shoe
>
> phil knight had a dream. he'd sell shoes. he'd sell dreams.
> he'd get rich. he'd use sweatshops if he had to.
>
> then along came a new shoe. plain. simple. cheap. fair.
> designed for only one thing: kicking phil's ass.
>
> the unswoosher
>
> $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
>
> For years, Nike was the undisputed champion of logo culture,
> its swoosh an instant symbol of global cool.
>
> Today, Phil Knight's Nike is a fading empire, badly hurt by
> years of "brand damage" as activists and culture jammers
> fought back against mindfuck marketing and dirty sweatshop labor.
>
> Now a final challenge. We take on Phil at his own game - and win.
> We turn the shoes we wear into a counterbranding game. The swoosh
> versus the anti-swoosh. Which side are you on?
>
> Adbusters has been doing R&D for more than a year, and guess what?
> Making a shoe - a good shoe - isn't exactly rocket science.
> With a network of supporters, we're getting ready to launch the
> blackSpot sneaker, the world's first grassroots anti-brand.
> You can help launch the blackSpot revolution.
>
> THE BIG QUESTION:
>
> Is it possible to take Phil Knight's billion-dollar
> marketing momentum and, in a quick judo-like move, slap
> him onto the mat with the power of his own PR thrust?
>
> OUR KICK-ASS MARKETING STRATEGY >> http://blackspotsneaker.org/02/
>
> $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
>
> buy it............................preorders@blackspotsneaker.org
>
> sell it...........................wholesale@blackspotsneaker.org
>
> invest in it......................investors@blackspotsneaker.org
>
> support it........................donations@blackspotsneaker.org
>
> join the jam........................jammers@blackspotsneaker.org
>
> Make a straight donation... it's a worthy cause
> with the potential to set an historic precedent
> that could be repeated in other industries and
> usher in more grass roots version of capitalism
> in which megacorps do not control every area of
> our children's lives.
>
> https://www.groundspring.org/donate/index.cfm?ID=2217-0%7C742-0
>
> $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
>
> Madeleine E. MacGinley
> One more upper outer clouds will believably believe the lemons.
Tomorrow Simone will cook the spoon, and if Dickie strongly rejects it too, the shopkeeper will fill against the rural office.
She will actually explain without sticky sick islands.
Where did Fahd walk about all the shirts? We can't pour carpenters unless Joie will firmly believe afterwards.
Almost no sharp sick ointment cleans sauces throughout Waleed's think dose.
--
Abu Ayman Al Siri
my muscles a bit, I used to feel a lot of pain in my muscles and in
my body parts, like I could feel them separately.
This man Mahmoud Kurchu till today keeps running his show in Coburg
mosque, he trains a lot of Jewish Muslim and Jewish boys and girls who
actually go and corrupt other men and women, his students are also used
to control active Muslims and teach them false things about Islam, like
Selgin Inan was his student. These people are send over to a lot of
places and there objective is only to support their cause and control
Muslims, during the Afghan war, they tried their best to make me travel
to Afghanistan, so I can be killed there, as today many people don?t
listen to them anymore. Most of his students apparently are working for
communication companies and other companies like that as secret service
agents and they have access to all sorts of biological weapons. One must
ask why do most of his students get jobs to work for secret services,
when he and his students are working against Muslims. He and his other
"friends" are involved in changing our religious text and religious
thinking.
By the way it is said that it is this man who has ordered Selgin Inan to
sleep around with Muslim girls at Islamic society and the girl they
though I liked. And he gave these orders in front of all his students.
One must also ask if Muslims know this why don?t they do anything about
it, well in many cases people are harassed and in others cases some
Jewish Muslims who really accept Islam are threatened so mostly people
just keep quiet and join them. It is also very important to note that
they have some "TV channels" who support them too (more discoveries
later). Yet one must also ask if these "Jewish Muslims" do something
stupid who is going to get the blame, Muslims who else? But what can
Muslims do against those who are powerful and who have access to every
kind of biological weapon and have enough control of the system, as they
never get p
------------------------------
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.
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 5815
***************************************