[27313] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9045 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 12 09:06:48 2006

Date: Sun, 12 Mar 2006 06:05:05 -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           Sun, 12 Mar 2006     Volume: 10 Number: 9045

Today's topics:
    Re: A Problem With GD <uri@stemsystems.com>
        control character in regex? <kenw232@yahoo.com>
    Re: control character in regex? <someone@example.com>
    Re: FAQ 1.14 What is a JAPH? robic0
    Re: FAQ 1.14 What is a JAPH? <rm@biteme.org>
    Re: for installing perl modules - is there a default C  <imfeaw5672@pacbell.net>
        Paths help  hope@hope.com
    Re: Paths help <no@email.com>
        Source Code Analyzing <daniel@QMiC.de>
    Re: Toggle flags (WAS: A Problem With GD) <jurgenex@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 12 Mar 2006 00:05:36 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: A Problem With GD
Message-Id: <x73bhofe1r.fsf@mail.sysarch.com>

>>>>> "r" == robic0  <robic0> writes:

  r> On 11 Mar 2006 21:20:50 GMT, Abigail <abigail@abigail.nl> wrote:
  >> $var = [1, 0] -> [$var];
  r> meaningless..

perfectly valid and working perl. not for production.

brainless => robic0

and yes i shouldn't be feeding the troll

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: Sun, 12 Mar 2006 02:40:19 -0500
From: Ken Williams <kenw232@yahoo.com>
Subject: control character in regex?
Message-Id: <7gQQf.134575$8d1.134432@read1.cgocable.net>

I have a simple regex [A-Z0-9].  This hits all uppercase characters and 
numbers. I also want all control characters to be in there.  anyone know 
how?

[A-Z0-9\c]

is that it?


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

Date: Sun, 12 Mar 2006 08:01:37 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: control character in regex?
Message-Id: <BzQQf.17313$Cp4.3688@edtnps90>

Ken Williams wrote:
> I have a simple regex [A-Z0-9].  This hits all uppercase characters and
> numbers. I also want all control characters to be in there.  anyone know
> how?

[[:upper:][:digit:][:cntrl:]]


John
-- 
use Perl;
program
fulfillment


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

Date: Sat, 11 Mar 2006 18:15:58 -0800
From: robic0
Subject: Re: FAQ 1.14 What is a JAPH?
Message-Id: <qv0712djp28cbmmfivm4l39qvfftkgmd30@4ax.com>

On Sat, 11 Mar 2006 18:03:02 -0800, PerlFAQ Server <brian@stonehenge.com> wrote:

>This is an excerpt from the latest version perlfaq1.pod, which
>comes with the standard Perl distribution. These postings aim to 
>reduce the number of repeated questions as well as allow the community
>to review and update the answers. The latest version of the complete
>perlfaq is at http://faq.perl.org .
>
>--------------------------------------------------------------------
>
>1.14: What is a JAPH?
>
>    (contributed by brian d foy)
>
>    JAPH stands for "Just another Perl hacker,", which Randal Schwartz used
>    to sign email and usenet messages starting in the late 1980s. He
>    previously used the phrase with many subjects ("Just another x
>    hacker,"), so to distinguish his JAPH, he started to write them as Perl
>    programs:
>
>            print "Just another Perl hacker,";
>
>    Note the trailing comma and space, which allows the addition of other
>    JAxH clauses for his many other interests.
>
>    Other people picked up on this and started to write clever or obfuscated
>    programs to produce the same output, spinning things quickly out of
>    control while still providing hours of amusement for their creators and
>    readers.
>
>    CPAN has several JAPH programs at http://www.cpan.org/misc/japh .
>
>
>
>--------------------------------------------------------------------
>
>The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
>are not necessarily experts in every domain where Perl might show up,
>so please include as much information as possible and relevant in any
>corrections. The perlfaq-workers also don't have access to every operating
>system or platform, so please include relevant details for corrections 
>to examples that do not work on particular platforms. Working code is
>greatly appreciated.
>
>If you'd like to help maintain the perlfaq, see the details in 
>perlfaq.pod.
>*** Free account sponsored by SecureIX.com ***
>*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***

What is a JAPH?
Its a Jap Hack that stole my programming job, outsourced from an American company!!
(God bless America!)

-robic0-


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

Date: Sun, 12 Mar 2006 02:13:38 GMT
From: Ronald Matthews <rm@biteme.org>
Subject: Re: FAQ 1.14 What is a JAPH?
Message-Id: <mtLQf.36022$Qh1.269864@news20.bellglobal.com>

PerlFAQ Server <brian@stonehenge.com> trolled:

> 1.14: What is a JAPH?

>     (contributed by brian d foy)

>     JAPH stands for "Just another Perl hacker,", which Randal Schwartz used
>     to sign email and usenet messages starting in the late 1980s. He

Har.  "Perl Hacker" is an oxymoron.  Real "hackers" use C, not Perl,
not Python, C++ or any of that garbage.  Real hackers use C and
sometimes assembler.

But, hey, if it makes you amateur programmers feel like a big deal,
keep on pretending that Perl is a real language (like BASIC) and
don't pay any attention to the rest of us while we laugh at you.

cordially, as always,

rm


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

Date: Sun, 12 Mar 2006 07:18:47 GMT
From: "sm" <imfeaw5672@pacbell.net>
Subject: Re: for installing perl modules - is there a default C compiler on win X64
Message-Id: <rXPQf.38034$_S7.16680@newssvr14.news.prodigy.com>

Here is "perl -V"

--> perl -V
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
  Platform:
    osname=MSWin32, osvers=5.0, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags 
='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DE
S_FCRYPT -DBUILT_BY_ACTIVESTATE -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT 
 -DPERL_IM
PLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='12.00.8804', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', 
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags 
'-nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"C:\PRG\Perl\lib\CORE"
 -machine:x86'
    libpth=\lib
    libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.lib sh
ell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib 
winmm.lib  version.lib od
bc32.lib odbccp32.lib msvcrt.lib
    perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.li
b shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib 
mpr.lib winmm.lib  version.li
b odbc32.lib odbccp32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
    gnulibc_version='undef'
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', 
lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"C:\PRG\Perl
\lib\CORE"  -machine:x86'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
                        USE_SITECUSTOMIZE PERL_IMPLICIT_CONTEXT
                        PERL_IMPLICIT_SYS
  Locally applied patches:
        ActivePerl Build 813 [148120]
        Iin_load_module moved for compatibility with build 806
        PerlEx hacks for CGI::Carp
        Less verbose ExtUtils::Install and Pod::Find
        instmodsh upgraded from ExtUtils-MakeMaker-6.25
        24699 ICMP_UNREACHABLE handling in Net::Ping
        21540 Fix backward-compatibility issues in if.pm
  Built under MSWin32
  Compiled at Jun  6 2005 13:36:37
  @INC:
    C:/PRG/Perl/lib
    C:/PRG/Perl/site/lib
    .
-->

Thanks,

sm
"Sisyphus" <sisyphus1@nomail.afraid.org> wrote in message 
news:4411492c$0$25200$afc38c87@news.optusnet.com.au...
>
> "sm" <imfeaw5672@pacbell.net> wrote in message
>
>>
>> Test Compiling config/signedchar.c
>> 'cl' is not recognized as an internal or external command,
>> operable program or batch file.
>> Test Compile/Run config/unsigned.c
>> 'cl' is not recognized as an internal or external command,
>> operable program or batch file.
>> Test Compiling config/Ksprintf.c
>> ...................
>>
>> I would like to know what C compiler pacakge I need for this. I 
>> downloaded
> a
>> GNU GCC
>> for Win but the compiler is named something other than "lc". Is there
>> another compiler
>> I can use on Win X64.
>>
>
> 'cl.exe' is the Microsoft Visual Studio compiler.
>
> One thing to consider is that, although your machine is 64-bit, the perl 
> you
> have is probably 32-bit perl ... unless you built it yourself (which 
> sounds
> unlikely) or someone built a 64-bit version of perl for you (and I don't
> know of anyone doing that).
>
> Can you give us a copy'n'paste of what running 'perl -V' produces ? The 
> way
> to proceed depends upon what that reveals.
>
> Cheers,
> Rob
>
>
> 




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

Date: Sun, 12 Mar 2006 12:05:15 GMT
From: hope@hope.com
Subject: Paths help 
Message-Id: <un381258ipfuda1uf871m6oa164lhn5aan@4ax.com>


Hi all

WinXp PRo
Apache
Perl
Msql

I trying to sort out how to put in pathes

I have apache setup like
C:\apache\Apache2\
cgi-bin
Htdocs

Now in my cgi-bin folder I have a folder called test
In this folder I have a script called test.cgi

It has in it
## GET USERS

$folder="users\\uxxx\\perdata\\users";
@userfiles=`dir $folder`;
$folder="users/uxxx/perdata/users";

Now my users are in

C:\apache\Apache2\htdocs\web1\test\users

I have put in

$folder="..\\..\\htdocs\\web1\\test\\users";
@userfiles=`dir $folder`;
$folder="../../htdocs/web1/test/users";

That does not work

I have put in

$folder="htdocs\\web1\\test\\users";
@userfiles=`dir $folder`;
$folder="htdocs/web1/test/users";

That does not work

I have put in
$folder="\web1\\test\\users";
@userfiles=`dir $folder`;
$folder="/htdocs/web1/test/users";


That does not work

PLEASE can some one help on this paths thing for me

1) why the two \\ in the first one

2) Then why the/ on the second one.

Can you please explain in simple terms how you go from one folder up from where you are or
down from where you are.

So if I had

cgi-bin\test and in the test folder I had test.cgi
In the test.cgi I wanted to goto
htdocs\test\test

How would I put the path.

I know this is very simple when you know how

Thanks



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

Date: Sun, 12 Mar 2006 13:27:55 +0000
From: Brian Wakem <no@email.com>
Subject: Re: Paths help
Message-Id: <47ilusFfq2mfU1@individual.net>

hope@hope.com wrote:

> Now my users are in
> 
> C:\apache\Apache2\htdocs\web1\test\users
> 
> I have put in
> 
> $folder="..\\..\\htdocs\\web1\\test\\users";
> @userfiles=`dir $folder`;
> $folder="../../htdocs/web1/test/users";


 ../../ moves you up the dir tree two levels, which puts us in
C:/apache/Apache2/htdocs/web1, so ../../htdocs/web1/test/users is the same
as C:/apache/Apache2/htdocs/web1/htdocs/web1/test/users


> PLEASE can some one help on this paths thing for me
> 
> 1) why the two \\ in the first one


No idea, you've done that, how can I explain your actions?


> 2) Then why the/ on the second one.


That's how it should be.



> Can you please explain in simple terms how you go from one folder up from
> where you are or down from where you are.


 ../ moves up the dir tree.

 ./dirname moves down.


> So if I had
> 
> cgi-bin\test and in the test folder I had test.cgi
> In the test.cgi I wanted to goto
> htdocs\test\test


Easier to use an absolute path, but it would be ../../htdocs/test/test



-- 
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png


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

Date: Sun, 12 Mar 2006 01:22:53 -0800
From: Daniel Zinn <daniel@QMiC.de>
Subject: Source Code Analyzing
Message-Id: <dv0pka$jbp$1@newsserver.rz.tu-ilmenau.de>

Hey,

I am not sure if I tried hard enough[1], but perhaps you can guide me, where
to go on with reading, or even propose some code sniplets. Ok, here is the
problem:

I want to analyze a Perl program. I want to transform every "line/statement"
of a given Perl script into a more abstract syntax which only deals with
function and variable definitions and calls/usage.

So, basicly my new "simplified" grammar looks like:
data Prog    =   Var VarName       -- a variable is used
               | Call FuncName     -- a function is called
               | Sub FuncName Prog -- FuncName is new function; body=Prog
               | SubClos Prog    -- an anom. function is created as closure
               | Dyn VarName       -- a "local" variable declaration
               | Lex VarName       -- a "my" variable declaration
               | Block Prog        -- just a { ... } block
               | Skip              -- something else
(sorry for this Haskell code over here, please don't feel offended ;))

So, since Perl is 'kind of' not easy to parse directly, I thought of using
the B module. After some browsing, it turned out that B::Xref is pretty
close. Unfortunately, I don't get the blocks, and the ordering is strange.
Since it should be very easy to get a representation like the one described
above, once you have the parse tree, I want to ask, if someone has some
experience with the B module(s). If not, it would be nice, if you could
point me to some readings where I could learn how to handle this framework. 

Apart from this, I also want to do some variable assignment tracking, so I
really would like to understand how the Parse tree is organized and how you
can do transformation on it. So, is there any good place to start reading?


Thank you so much,
  Daniel

[1] I experimented around with many B::???? modules,
    tried to understand the B::Xref source code,
    tired to figure out how to traverse the parse tree,
    but could not find anything where to start, for example how to get this
    tree at the first place...



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

Date: Sun, 12 Mar 2006 02:51:24 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Toggle flags (WAS: A Problem With GD)
Message-Id: <M0MQf.3392$Px4.603@trnddc04>

robic0 wrote:
> There is no such thing as a "boolean" type in Perl.

True.
But there are nevertheless boolean values that can be expressed in Perl data 
types.

> This:
> "$var = !$var;" ,
> is  exactly:
> $var = 1 - $var;
> in Perl, I think, if $var == 0 or 1.

Well, did you try it? Because it is not.
Boolean values are _not_ represented as numbers. This becomes quite obvious 
when you try to print them.

> So in Perl, !(not) as a TRUE referrs to it being 0.
> For example, what does this translate to in Perl (?):
>
> $var = -7;
> $var = !$var;

$var now has the logical value false. Where's the problem?

jue 




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

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 9045
***************************************


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