[18555] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 723 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 19 18:10:43 2001

Date: Thu, 19 Apr 2001 15:10:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <987718213-v10-i723@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 19 Apr 2001     Volume: 10 Number: 723

Today's topics:
        nt perl integer to mainframe pl/i int (Mark Haskamp)
    Re: nt perl integer to mainframe pl/i int <uri@sysarch.com>
        open (filenaam, "http://wwwdomain.com") or die <sjaaknabuurs@hetnet.nl>
    Re: open (filenaam, "http://wwwdomain.com") or die <uri@sysarch.com>
    Re: PERL Code Generator (Randal L. Schwartz)
    Re: PERL Code Generator <robbie@totaln.com>
        perlcc ? <prostus@poczta.wp.pl>
        possible to pass a parameter from href to cgi script? (Jana Cole)
    Re: reading a specific paragraph <abe@ztreet.demon.nl>
    Re: So what do YOU use Perl for? <elaine@chaos.wustl.edu>
    Re: So what do YOU use Perl for? <elaine@chaos.wustl.edu>
    Re: So what do YOU use Perl for? <mischief@velma.motion.net>
        use strict & require... <mnm@mnm.com>
    Re: using Unicode::String -- ordinals <motivus_BLAHdiBLAH@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 19 Apr 2001 19:00:31 GMT
From: Mark.Haskamp@lexis-nexis.com (Mark Haskamp)
Subject: nt perl integer to mainframe pl/i int
Message-Id: <3adf32a7.281246771@newshost>

I have a mainframe PL/I structure that looks like this:

DCL RECORD_IN CHAR(116) VAR STATIC INIT('');
DCL 1 FOO BASED ( ADDR ( RECORD_IN ) );
      2 VLI   FIXED BIN(15),
      2 TAG   CHAR(10),
      2 VAL   FIXED BIN(31);


I have an NT-based perl string that looks like this:
TERMCT=   412


In my Windows NT perl program, how can I convert the ascii string to
fit the structure defined in the mainframe PL/I structure (ebcdic
format)?  I'm using the 'asc2eb' function from 'Convert::IBM390'
module and I'm able to populate FOO.VLI and FOO.TAG correctly, but I
can't seem to get the correct integer value into FOO.VAL.



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

Date: Thu, 19 Apr 2001 20:11:04 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: nt perl integer to mainframe pl/i int
Message-Id: <x7hezkk5uv.fsf@home.sysarch.com>

>>>>> "MH" == Mark Haskamp <Mark.Haskamp@lexis-nexis.com> writes:

  MH> I have a mainframe PL/I structure that looks like this:
  MH> DCL RECORD_IN CHAR(116) VAR STATIC INIT('');
  MH> DCL 1 FOO BASED ( ADDR ( RECORD_IN ) );
  MH>       2 VLI   FIXED BIN(15),
  MH>       2 TAG   CHAR(10),
  MH>       2 VAL   FIXED BIN(31);

  MH> In my Windows NT perl program, how can I convert the ascii string to
  MH> fit the structure defined in the mainframe PL/I structure (ebcdic
  MH> format)?  I'm using the 'asc2eb' function from 'Convert::IBM390'
  MH> module and I'm able to populate FOO.VLI and FOO.TAG correctly, but I
  MH> can't seem to get the correct integer value into FOO.VAL.

use pack N or V depending on the endianness of the two platforms.  that
is how to get a 32 bit integer into a record or byte string. in fact you
should have been doing the same (with the 16 bit format) for VLI

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html


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

Date: Thu, 19 Apr 2001 22:35:28 +0200
From: "sjaak nabuurs" <sjaaknabuurs@hetnet.nl>
Subject: open (filenaam, "http://wwwdomain.com") or die
Message-Id: <#wJEH9QyAHA.291@net005s.hetnet.nl>

I want to open a file from a website for manipulation. My code is:

open (FILENAME, "http://<filename>") or die("Cannot open file: $!");
# work on the file
close FILENAME;

I am getting a 'No such file or directory' error.

I have tried this both offline (hoping to connect automatically) and
online.. same result both times.

Hope someone can help - thanks.



--

Sjaak Nabuurs

Visit www.CityTower.com and create your own citytower
and become the internet center in your city.




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

Date: Thu, 19 Apr 2001 20:38:23 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: open (filenaam, "http://wwwdomain.com") or die
Message-Id: <x7eluok4lb.fsf@home.sysarch.com>

>>>>> "sn" == sjaak nabuurs <sjaaknabuurs@hetnet.nl> writes:

  sn> I want to open a file from a website for manipulation. My code is:
  sn> open (FILENAME, "http://<filename>") or die("Cannot open file: $!");
  sn> # work on the file
  sn> close FILENAME;

open only works on files on the local system. it does not support
protocols such as HTTP. use the LWP module for that. you can find it on
CPAN.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html


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

Date: 19 Apr 2001 12:06:52 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: PERL Code Generator
Message-Id: <m17l0g7lpv.fsf@halfdome.holdit.com>

>>>>> "Michael" == Michael Wenzelmaier <michaelw@elkhart.net> writes:

Michael> "CodeCharge is a powerful code generator that helps web
Michael> developers and non-programmers create database-driven web
Michael> applications in a matter of hours. You may use it to easily
Michael> create any types of web forms and grids, such us User
Michael> Registration Form for the web site or an Event List, or you
Michael> may generate full featured Employee Directories, Forums and
Michael> Task Management Systems up to advanced Online Auctions,
Michael> Stores, Portals and Intranets. In fact, CodeCharge comes with
Michael> many of such solutions already pre-built and you may easily
Michael> customize them to your needs. CodeCharge works by letting you
Michael> select database fields to be included on each web page and
Michael> specifying how they should interact. It then generates
Michael> database-driven, dynamic websites in many server-programming
Michael> languages such as ASP, ColdFusion, JSP, PHP and Perl."

Michael> http://www.[deleted]/codecharge

"SpamForCodeCharge is a powerful spam generator that helps
WebProCenter and their marketeers create spam-driven Usenet postings
in a matter of minutes.  You may use it to easily create any types of
Spam and Usenet Postings, such us [sic] Cash Diverter Form for the
Usenet post or a rented Mailing List, or you may generate full
featured Spam Lists, Forum Autoinserts, and Spamhauses.  In fact
SpamForCodeCharge comes with many of such mailing lists and newsgroups
already prebuilt and you can easily customize them to your needs.
SpamForCodeCharge works by letting you select names for database
fields to be included in each spam page and specifying how you want
the victim, er, customer to interact.  It then generates
database-driven, dynamic spam in many spammish languages such as
Usenet, Email, Web Forums, Fax, Pager, and cellphone spam."

http://www.get.a.clue/spamforcodecharge

-- 
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: Thu, 19 Apr 2001 19:42:55 GMT
From: "RobbieB" <robbie@totaln.com>
Subject: Re: PERL Code Generator
Message-Id: <3dHD6.27573$PF4.46072@news.iol.ie>

lol. period.





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

Date: Thu, 19 Apr 2001 23:28:35 +0200
From: "Prosty" <prostus@poczta.wp.pl>
Subject: perlcc ?
Message-Id: <9bnluj$1i8$1@news.tpi.pl>

What make compile scrypt to .exe
I have use perlcc, result:
Couldn't open C:WINDOWSTEMP/myfile..pl.val
Whot is wrorng?
I have Win98
perl5.6.0

Prosty




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

Date: Thu, 19 Apr 2001 20:54:31 GMT
From: quikscor@ix.netcom.com (Jana Cole)
Subject: possible to pass a parameter from href to cgi script?
Message-Id: <3adf4f85.19868097@nntp.ix.netcom.com>

I would like to have two text links call the same cgi script.  The
form generated by the cgi script would have slightly different fields
depending on which link was clicked.  Can I pass an identifying
parameter in the link's HTML somehow?


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

Date: Thu, 19 Apr 2001 23:48:15 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: reading a specific paragraph
Message-Id: <0vludt0n9sirk6o1fg4vlgf3dr0rfug9et@4ax.com>

On Wed, 18 Apr 2001 18:12:01 -0500, "R. Utterback" <rutterba@cisco.com>
wrote:

 ...
> 
> I have tried using $/ to set the input record separator and do this:
> 
> $/ = "";
> while (<INFILE>) {
>     if (/Comp:/) {
>         $_ =~ s/\n//g;  #remove any newlines
>         $string = ($_ =~ /\((.*)\)/);
>     }
> }
> 
> The problem is, some of the files I am working with have the stinkin ^M at
> the end of each line, which throws off the whole "read in by paragraph"
> thing.

I don't think it's pretty, but it seems to work:

	my($eol) = <INFILE> =~ /(\cM?\cJ)\z/;
	seek INFILE, 0, 0;
	$/ = $eol x 2;

before the read loop.

One would have hoped for some extra magic regarding the ':crlf'
discipline for binmode(), making 'paragraph mode' more transparent for
cross platform (text)files.

-- 
Good luck, Abe
Amsterdam Perl Mongers http://amsterdam.pm.org
perl -wle '$_=q@Just\@another\@Perl\@hacker@;print qq@\@{[split/\@/]}@'


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

Date: Thu, 19 Apr 2001 18:17:16 GMT
From: "Elaine Ashton" <elaine@chaos.wustl.edu>
Subject: Re: So what do YOU use Perl for?
Message-Id: <MYFD6.9525$cF.203426@news1.nokia.com>

"Eli the Bearded" <elijah@workspot.net> wrote in message
news:eli$0104121729@qz.little-neck.ny.us...
> If Something::Bit and Something::Block come in the same distribution
> are they seperate modules or not? Elaine's counting would say no, yours
> would say yes.

Well....a distribution is a 'thing' that may contain mutiple modules. I
had
meant to say distribution there since many, if not most, modules
bundled together in a distribution are a functional unit and don't exist
without each other. So...yes there are technically near 7,000 modules
contained within ~2100 distributions but I find the distribution number
to be a more meaningful metric.

> takes Elaine's view of counting

:)

e.


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

Date: Thu, 19 Apr 2001 18:18:25 GMT
From: "Elaine Ashton" <elaine@chaos.wustl.edu>
Subject: Re: So what do YOU use Perl for?
Message-Id: <RZFD6.9526$cF.203456@news1.nokia.com>

"Randal L. Schwartz" <merlyn@stonehenge.com> wrote in message
news:m1g0fdq097.fsf@halfdome.holdit.com...
> >>>>> "Mark" == Mark Jason Dominus <mjd@plover.com> writes:
> Mark> I was delighted even further when we got married,
>
> Wow.  So you can in fact use Perl to help you get more dates, just
> like I said in the last paragraph of
> <http://www.stonehenge.com/merlyn/UnixReview/col25.html>!  Cool!

I thought that was what Bill was for. :)

e.


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

Date: Thu, 19 Apr 2001 21:25:00 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: So what do YOU use Perl for?
Message-Id: <tdultcnsdgl0eb@corp.supernews.com>

Abigail <abigail@foad.org> wrote:
> Chris Stith (mischief@velma.motion.net) wrote on MMDCCLXXXVII September
> MCMXCIII in <URL:news:tds7ccn0vdtoa6@corp.supernews.com>:
> '' 
> '' I haven't reinvented the newsreader yet, but i have a Perl script
> '' that configures and launches my newsreader for me. 


> My newsreader calls a Perl program when I want to post something.

Mine as a matter of fact does as well, but the Perl program in my
case is just a random signature generator.

Chris

-- 
Christopher E. Stith
Get real!  This is a discussion group, not a helpdesk. You post
something, we discuss its implications. If the discussion happens to
answer a question you've asked, that's incidental. -- nobull, clp.misc



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

Date: Thu, 19 Apr 2001 09:47:04 -0700
From: "Matt" <mnm@mnm.com>
Subject: use strict & require...
Message-Id: <9bnj04$set$1@plutonium.btinternet.com>

If I use this

use strict;
$0 =~ s:\\:/:g;
my $root = $1 if ($0 =~ /(.*)\/[^\/]+/);
require "$root/inc/global.pl";

Then try to print a var created in the global.pl file I get the "Global
symbol bla requires..." errors message. Can you get round this?




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

Date: 19 Apr 2001 18:04:45 GMT
From: "bmm" <motivus_BLAHdiBLAH@hotmail.com>
Subject: Re: using Unicode::String -- ordinals
Message-Id: <9bn9bt$mqk@dispatch.concentric.net>

got it!        ;-)




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

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


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