[11153] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4753 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 26 16:07:21 1999

Date: Tue, 26 Jan 99 13:00:23 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 26 Jan 1999     Volume: 8 Number: 4753

Today's topics:
        A script which uploads and creates a link... panchamh@mcmaster.ca
        ARGV; Is there a length restriction? <bfreedman@esdim.noaa.gov>
        calling a function from a DLL <nospam@tin.it>
        Catalog of items for sale - perl <dpuryear@usa.net>
    Re: CGI.pm Warnings - popup menues dturley@pobox.com
    Re: Date actions using flatfile database <me@me.com>
    Re: Deleting dupes with Perl dturley@pobox.com
    Re: Diamond Operator and $ARGV[0] <spike_YYwhiteYY@YYdellYY.com>
    Re: Diamond Operator and $ARGV[0] (Karlon West)
        Help on Change Case Susbtitution <rp7667@email.sps.mot.com>
    Re: How to change @INC path permenantly? <zenin@bawdycaste.org>
        how to return multiple values in perl? tariq.ahmed@usa.net
    Re: how to return multiple values in perl? <tchrist@mox.perl.com>
    Re: impossible configure perl CGI on IIS4? <tommy@iinteractive.com>
    Re: libwww and broken pipe? ftn@yesbox.net
        Majordomo interface <sbenjamin@mailandnews.com>
    Re: Majordomo interface <greg@hassan.com>
        Number manipulation and time formats <kimntodd@dontspamus.execpc.com>
    Re: Number manipulation and time formats <kimntodd@dontspamus.execpc.com>
    Re: Number manipulation and time formats (K. Krueger)
    Re: Oracle from Perl and Linux (Mads Toftum)
        Perl error/exception strings... <dolson093@sprintmail-ns.com>
        Perl programs <westt@pins.co.uk>
        Problems during build: segfault during autosplit (Lars Kellogg-Stedman)
        Recursively reading files <lcoates@bu.edu>
    Re: Recursively reading files <tchrist@mox.perl.com>
    Re: stat() interpretation (Charles DeRykus)
    Re: Statistics for comp.lang.perl.misc droby@copyright.com
        Trouble using perl under win98 <lcoates@bu.edu>
    Re: Using a variable as a variable name ankadakia@hotmail.com
    Re: Using a variable as a variable name <bruceh@interaccess.com>
    Re: What's the character? <greg@hassan.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Tue, 26 Jan 1999 20:14:11 GMT
From: panchamh@mcmaster.ca
Subject: A script which uploads and creates a link...
Message-Id: <78l7ma$cd3$1@nnrp1.dejanews.com>

Hi..

I have been looking a but on the web and I found a few scripts which upload
and do not create a link and viceversa...

And since I am new to perl, i have tried to combine two scripts
unsuccessfully...I am wondering, if someone knows or give me a basic idea or
a way to combine these two features in a script...upload to a web server and
then create a link for it... I kind of need this in urgent for work...

Any help would be greatly appreciated...Thanks...

Mihir

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 26 Jan 1999 13:40:31 -0500
From: Bob Freedman <bfreedman@esdim.noaa.gov>
Subject: ARGV; Is there a length restriction?
Message-Id: <36AE0C1F.F7FA8C97@esdim.noaa.gov>

Is there a limt on the size of a string I send in a command line
argument?
It seems when I send a long url as an argument I get an error that
displays the name of my script and the words No match!

#!/usr/local/bin/perl -w
use LWP::Simple;
use diagnostics;

$url = $ARGV[0];
print $url,"\n";


--
***************************************************
*               Bob Freedman                      *
*          bfreedman@esdim.noaa.gov               *
*              301-713-1201                       *
*            301-713-1249 Fax                     *
*    National Environmental Data Index (NEDI)     *
*           http://www.nedi.gov                   *
***************************************************




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

Date: Tue, 26 Jan 1999 19:44:29 +0100
From: "leo" <nospam@tin.it>
Subject: calling a function from a DLL
Message-Id: <78l2e2$q2d$1@nslave1.tin.it>

How can I (if possible) call the windows standard file selector dialog from
Perl?

Is there a way to call functions in dlls from a perl program?

Thanks!

leo






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

Date: Tue, 26 Jan 1999 13:07:11 -0600
From: Dustin Puryear <dpuryear@usa.net>
Subject: Catalog of items for sale - perl
Message-Id: <36AE125F.84BE106F@usa.net>

I am looking for a set of scripts to enable me to setup a website where
people can post items they want to sell or buy. IOW, a classified ads
site. I have no issue with using GPL'd software since this site will be
nonprofit. Anyways, is there a set of perl scripts available to do this?

Regards, Dustin

-- 
Dustin Puryear * dpuryear@usa.net * ICQ 6644253 
Help Crack Government Encryption: http://www.distributed.net
Lesser artists borrow. Great artists steal.



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

Date: Tue, 26 Jan 1999 20:29:45 GMT
From: dturley@pobox.com
Subject: Re: CGI.pm Warnings - popup menues
Message-Id: <78l8je$d0j$1@nnrp1.dejanews.com>

In article <36ace0cf.2978198@news>,
  richardp@nucleus.com (Richard Pearman) wrote:

> >Sometimes a keyword MUST be preceded by a dash, sometimes the first letter
> >MUST be capitalized, and with all that, sometimes the quote is necessary to
> >prevent error messages when using "use strict".

I've NEVER used a quote, I ALWAYS use strict. (they aen't keywords anyway.)
>
>The page just terminates when
> it gets to a subrouteen using a menue with labels and values from a
> hash.

So check the error log, or run with the -c flag. The script is die-ing because
of an error in the script, not the module.

--
____________________________________
David Turley
dturley@pobox.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 26 Jan 1999 19:02:39 -0000
From: "Steve" <me@me.com>
Subject: Re: Date actions using flatfile database
Message-Id: <78l3gh$m2q$1@news6.svr.pol.co.uk>


>$releasedate =~ s{(..)(?=.)}{$1/}g; print $releasedate;


Hi,

Thanks, that worked great.

>^^ 2. Compare the date in the database with the current system date. If the
>^^ date in the database has passed already, I want it to print "available
now",
>^^ if it hasn't arrived yet I want it to say "coming soon". And if the date
has
>^^ passed in the last 14 days, I want it to say "new release". Anyone know
how
>^^ I can do this?
>
>Well.... you're going to have a little problem here. If "YY" is 25, when
>is that?


Hmm yeah, I forgot about 2000 compliancy. I changed the date format to
DDMMYYYY - do you know how can I do it with this?

Thanks.

Steve





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

Date: Tue, 26 Jan 1999 20:34:45 GMT
From: dturley@pobox.com
Subject: Re: Deleting dupes with Perl
Message-Id: <78l8t4$dbh$1@nnrp1.dejanews.com>

In article <78km8q$ss6$1@nnrp1.dejanews.com>,
  jxdub@my-dejanews.com wrote:
> but now I need to delete the
> duplicates...  Could anyone tell me a good way to do this? The file would

here's one way. put the file into @out, sort it, then print it.

@sorted = sort @out;
$prev = 'nonesuch';
@n_out = grep($_ ne $prev && ($prev = $_), @sorted); #remove duplicates

        foreach $address (@n_out) {
                print "$address\n";
        }


--
____________________________________
David Turley
dturley@pobox.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 26 Jan 1999 13:16:53 -0600
From: "Spike White" <spike_YYwhiteYY@YYdellYY.com>
Subject: Re: Diamond Operator and $ARGV[0]
Message-Id: <78l3ns$lmd$1@obsidian.us.dell.com>

The <> shifts @ARGV.  So the <> symbol only returns false once.  If
you want to re-use <>, you must re-load the @ARGV array.

Sounds like <> is doing what it's supposed to.

Spike

Tom Christiansen wrote in message <36ae04c7@csnews>...
>In comp.lang.perl.misc, "DaveH" <DaveH@nnoossppaamm.acinom.com> writes:
>:I'm having trouble explaining to myself why the value of $ARGV[0] seems
>:to get clobbered upon entering a "while(<>)" loop.
>
>The answer is clearly documented in the manpages. If you had not screwed
>with your address, I might even have told you what it is.
>
>--tom
>--
>I just hate to be pushed around by some fucking machine. - Ken Thompson, on
the i960




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

Date: 26 Jan 1999 18:47:51 GMT
From: karlon@bnr.ca (Karlon West)
Subject: Re: Diamond Operator and $ARGV[0]
Message-Id: <78l2kn$1kb$1@crchh14.us.nortel.com>

DaveH (DaveH@nnoossppaamm.acinom.com) wrote:
> Hi all,

> I'm having trouble explaining to myself why the value of $ARGV[0] seems
> to get clobbered upon entering a "while(<>)" loop. The code snippet
> below simply counts the number of lines in the file specified in
> $ARGV[0].

> I tried searching the Usenet archives but couldn't find this question
> asked or answered anywhere.

> Here's the code...
[snip]
> print "ARGV[0] is $ARGV[0]\n";
> while (<>) {
>     ++$i;
> }
> print "ARGV[0] is: $ARGV[0]\n";
[snip]

> That's it.  Any explanation of why $ARGV[0] gets clobbered?
> Dave Honeyford

from "man perlop" or "perldoc perlop"

      The null filehandle <> is special and can be used to emulate the
      behavior of sed and awk.  Input from <> comes either from standard
      input, or from each file listed on the command line.  Here's how it
      works: the first time <> is evaluated, the @ARGV array is checked, and
      if it is empty, $ARGV[0] is set to "-", which when opened gives you
      standard input.  The @ARGV array is then processed as a list of
      filenames.  The loop

          while (<>) {
              ...                     # code for each line
          }

      is equivalent to the following Perl-like pseudo code:

          unshift(@ARGV, '-') unless @ARGV;
          while ($ARGV = shift) {
              open(ARGV, $ARGV);
              while (<ARGV>) {
                  ...         # code for each line
              }
          }


Karlon


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

Date: Tue, 26 Jan 1999 11:56:54 -0700
From: Omar Soto <rp7667@email.sps.mot.com>
Subject: Help on Change Case Susbtitution
Message-Id: <36AE0FEE.B33B3BB1@email.sps.mot.com>

Hello:
    Need some help in making or using a currently available
library function that will perform the following substitution:

$var =~ s/[A-Z]..[A-Z]/[a-z]..[a-z]/;   # i.e.  P76r  =>
p76r       P76R => p76r    p76R => p76r

I am later using the value of $var to open a file in UNIX, and
the input is not quaranteed to be either Lower Case of
UpperCase.

The reverse is also true.  The filename in UNIX is not
guaranteed to be either Lower Case or Upper Case, although this
is a problem that I can just kick back to the people providing
the UNIX file.

Not the same luck for the input.

Thank you,

Omar





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

Date: 26 Jan 1999 19:09:11 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: How to change @INC path permenantly?
Message-Id: <917377610.1079@thrush.omix.com>

[posted & mailed]

Mark Hamlin <mark.c.hamlin@bt.com> wrote:
: How do I change the @INC path permenantly?  Installing perl 5.005 using a pkgadd
: Solaris build, it did not set the path correctly.

	To put this as kindly as possible, the Solaris package system leaves
	much to be desired.

	Install from source (it's *very* simple):

	ftp://ftp.digital.com/pub/plan/perl/CPAN/src/perl5.005_02.tar.gz

	Need a compiler because the base Solaris is broken for not including
	one?

	Grab GCC (yes, this is a package, sorry):

	ftp://sunsite.unc.edu/pub/solaris/sparc/GNUgcc.GCC_VERSION.HARDWARE.Solaris.OS_VERSION.tar.gz

	Installing from source is *always* the best option if available. 
	Unless of course, your system is so memory deprived that it can't
	handle an xterm to sit around for a couple minutes unattended.

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Tue, 26 Jan 1999 20:18:57 GMT
From: tariq.ahmed@usa.net
Subject: how to return multiple values in perl?
Message-Id: <78l7v7$cge$1@nnrp1.dejanews.com>

Hi there.

I want to return multiple values. And for simple types, I have no problem.
But I want to return a number, hash, and an array.

{ # main routine

    local %items_hash;
    local @eachline;
    ($a,%items_hash,@eachline)=doit();
    print @eachline;
    print "\n";
    print $items_hash{"a"};
    print "\n$a\n";
}

sub doit
{
     local %myhash;
     $myhash{"a"}="b";
     $myhash{"b"}="c";
     @array=("one","two","three");
     return(1,%myhash,@array);

}

        So the output should be:
one two three
b
1

        But somehow the one and two dissapear:
three
b
1

Ideas? Thanks.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 26 Jan 1999 13:42:04 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: how to return multiple values in perl?
Message-Id: <36ae289c@csnews>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, tariq.ahmed@usa.net writes:
:I want to return multiple values. And for simple types, I have no problem.
:But I want to return a number, hash, and an array.

% man perlfunc

       The Perl model for function call and return values is
       simple: all functions are passed as parameters one single
       flat list of scalars, and all functions likewise return to
       their caller one single flat list of scalars.  

You pass in a list, and you pass out a list.  That's it.
But nothing stops you from putting references into those lists.
See the manpage.

--tom
-- 
    "They'll get my perl when they pry it from my cold, dead /usr/local/bin."
	    Randy Futor in  <1992Sep13.175035.5623@tc.fluke.COM>


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

Date: Tue, 26 Jan 1999 14:59:07 +0000
From: "Tommy W. Lee" <tommy@iinteractive.com>
To: foobar678@my-dejanews.com
Subject: Re: impossible configure perl CGI on IIS4?
Message-Id: <36ADD83B.91371EF@iinteractive.com>

first thing to try...
don't double click on the file to run it.
try running it on command line...bring up a DOS window and run script
if it works, then try typing in the URL to the script.
make sure the url is not the location of the file (eg.  file://c|inetpub/yada
yada/script.pl)
make sure it has the web server url (eg. http://www.yourserver.com/script.pl)
or if internal http://yourservername/script.pl)
-tommy


foobar678@my-dejanews.com wrote:

> *The folder it's in is marked executable.
> *The "Application Settings"|Configuation contains the
>  correct mappings for .pl files.
> *The script checkbox is checked
> *I ran the adsutil script and "adsutil set w3svc/CreateCGIWithNewConsole TRUE"
>  and it seemed to work.
>
> Nothing I do gets perl CGI to run. The perl script is
> very simple, it contains:
>   print "Content-Type: text/plain\n\n";
>   print "Hello, Perl world!\n";
>
> And ever time you click on the file, for a millisecond a console
> window flashes and the "you have chosen to download a file" box
> also flashes. Then Nothing.
>
> I am beginning to think IIS is a big piece of shit.
> Help is possible.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own



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

Date: Tue, 26 Jan 1999 20:01:53 GMT
From: ftn@yesbox.net
Subject: Re: libwww and broken pipe?
Message-Id: <78l6vb$bsj$1@nnrp1.dejanews.com>

Greetings, thanks for your answer,

> Could you show us a bit of code? just enough to allow someone to replicate
> your problem?

here it is (but read my comments below first):

sub myGet{
    my($url) = @_;

    my $ua = new LWP::UserAgent;

    $ua->agent("Mozilla/4.0");

    my $req = new HTTP::Request 'GET' => $url;
    $req->header('Accept' => 'text/html');

    # send request
    my $res = $ua->request($req);

    # check the outcome
    if ($res->is_success) {
	return $res->content;
    } else {
	return "error: $res->status_line";
    }
}

Seems like lynx and lwp-download dies of Broken pipe as well,
tried fetching the documents by doing a slogin to another server and fetch
them from there and that worked, so it seems like we are having some kind
of trouble fetching specific domains from this server :/

Can i trap this signal in some easy way in perl, so it just will go on?
What happends if I tell the perlscript to ignore that signal, will the
perlscript move on like nothing has happend?
Anyone got a bit of code that will do the trick?
The question is what will happend if the perl-script itself feels like
generate a Broken pipe?

/Calle

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 26 Jan 1999 14:03:40 -0500
From: "Stephen Benjamin" <sbenjamin@mailandnews.com>
Subject: Majordomo interface
Message-Id: <000101be495e$9c20c7a0$88ba0904@kb>

I have a question -- is there a majordomo web interface anywhere?  I'm
looking for a good one.  I've seen a few but they aren't what I need.
Here's what I'm looking for:

- User selects from 1 of several lists
- Enters his or her e-mail address
- is sent a URL to go to confirm their e-mail address
- when it is confirmed, the script sends the "approve" command string
to majordomo with the appropriate password.

I was going to write one myself, but why should I reinvent the wheel?
Does such a script exist for free somewhere?  Some of the users have
trouble with the e-mail interface -- mainly because of HTML
attachments and not following directions.

* Please reply via e-mail. *

TIA,

Stephen Benjamin
SBenjamin@mailandnews.com




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

Date: Tue, 26 Jan 1999 14:27:40 -0500
From: "Greg Hassan" <greg@hassan.com>
Subject: Re: Majordomo interface
Message-Id: <36ae178c$0$16664@nntp1.ba.best.com>

Its really not useful anymore.  Go to:

http://www.egroups.com/

You can create your own email groups
for free.   Plus, it saves all messages in
a searchable newsgroup style.

-Greg

--
===============================================================
  Greg Hassan, The Independent Solution (CGI,Java,SQL,Perl...)
http://www.hassan.com/, 1-607-225-4214, ICQ #: 8048297, E-Mail Preferred
===============================================================
Host many threaded, searchable discussion groups on your site:
    http://www.hassan.com/superbbs/

Host your own specialized internet search engine:
            http://www.hassan.com/site_searcher/

Sell your products in style, The Super Cart 1.6:
    http://www.hassan.com/shopcart/ (New demo)
===============================================================

Stephen Benjamin <sbenjamin@mailandnews.com> wrote in message
000101be495e$9c20c7a0$88ba0904@kb...
>I have a question -- is there a majordomo web interface anywhere?  I'm
>looking for a good one.  I've seen a few but they aren't what I need.
>Here's what I'm looking for:
>
>- User selects from 1 of several lists
>- Enters his or her e-mail address
>- is sent a URL to go to confirm their e-mail address
>- when it is confirmed, the script sends the "approve" command string
>to majordomo with the appropriate password.
>
>I was going to write one myself, but why should I reinvent the wheel?
>Does such a script exist for free somewhere?  Some of the users have
>trouble with the e-mail interface -- mainly because of HTML
>attachments and not following directions.
>
>* Please reply via e-mail. *
>
>TIA,
>
>Stephen Benjamin
>SBenjamin@mailandnews.com
>
>




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

Date: Tue, 26 Jan 1999 13:58:45 -0600
From: "End User" <kimntodd@dontspamus.execpc.com>
Subject: Number manipulation and time formats
Message-Id: <78l6na$j98$1@news1-alterdial.uu.net>

I have a simple little snip of code that i am sure can be optimised, but
here it is:

$a =243;
$b = 54;
if ($a >= 60){
    $d = $a % 60;
    $e = $a / 60;
    @q = split(/\./,$e);}
print "$h:$d:$b\n";

as you can see, it takes the number of minutes and converts it to hours and
minutes. This is the output of the code:

4:3:54

it should be 4:03:54

My question is how to easily convert the 3 into 03. Is there something that
I can perform on the $d to determine if it is <10, change the format?

I am fairly novice with PERL, although I have done some pretty fun stuff.
Can someone help me out here?

Thanks in advance.

--
Todd Hayward
Global Analyst, Systems Engineer
MCSE, Compaq ACT
noc at bakernet dot com




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

Date: Tue, 26 Jan 1999 14:03:05 -0600
From: "End User" <kimntodd@dontspamus.execpc.com>
Subject: Re: Number manipulation and time formats
Message-Id: <78l6ve$jg2$1@news1-alterdial.uu.net>

Oops, I forget an element:

$a =243;
$b = 54;
if ($a >= 60){
    $d = $a % 60;
    $e = $a / 60;
    @q = split(/\./,$e);
    $h = @q[0];}
print "$h:$d:$b\n";

Sorry for the oversight.




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

Date: 26 Jan 1999 12:12:17 -0800
From: kirbyk@best.com (K. Krueger)
Subject: Re: Number manipulation and time formats
Message-Id: <78l7j1$9pm$1@shell2.ba.best.com>

In article <78l6na$j98$1@news1-alterdial.uu.net>,
End User <kimntodd@dontspamus.execpc.com> wrote:
>I have a simple little snip of code that i am sure can be optimised, but
>here it is:
>
>as you can see, it takes the number of minutes and converts it to hours and
>minutes. This is the output of the code:
>
>4:3:54
>
>it should be 4:03:54
>
>My question is how to easily convert the 3 into 03. Is there something that
>I can perform on the $d to determine if it is <10, change the format?
>
Sure, this should be as easy as:

$d = "0" . $d if $d < 10;

Which concatenates a 0 to the number, if the number is less than 10.  

-- 
Kirby Krueger      O-     kirbyk@best.com 
<*> "Most .sigs this small can't open their own jump gate."


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

Date: Tue, 26 Jan 1999 19:21:43 GMT
From: mt@dev.null (Mads Toftum)
Subject: Re: Oracle from Perl and Linux
Message-Id: <36ae15a4.28180993@news.inet.tele.dk>

You might want to take a look at DBD::Proxy


vh

Mads Toftum, QDPH
som pe USENET reprfsenterer sig selv og ingen andre.


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

Date: Tue, 26 Jan 1999 12:42:49 -0800
From: "Olson, D. A." <dolson093@sprintmail-ns.com>
Subject: Perl error/exception strings...
Message-Id: <36ae28aa.0@news2.uswest.net>

I am currently up to my ears in design documentation, and need to finish up
a section on error handling / codes.  In a nutshell, I need to get a list of
all possible error/exception strings produced by Perl if possible ( via $!
and $@ ).  Does such a list exist?  We have designed the handling to be via
eval and at times in conjunction w/die, so the customer needs a list of
possible error strings.  Any help would be greatly appreciated... I searched
the FAQs and dejanews to no avail.

Thanks for any and all input.

Regards,
<oly>

--
Please remove "-ns" from my reply address when responding via e-mail.




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

Date: Tue, 26 Jan 1999 19:49:32 -0000
From: "Tom West" <westt@pins.co.uk>
Subject: Perl programs
Message-Id: <78l5j3$m8g$1@supernews.com>

I am a 6th form student from Britain trying to create some intranet pages
for an A-level project in I.T. I need some code to enable me to link my web
site page to data from and accounting package that will load it up in the
right format. If anyone has any code that is similar to this that they could
E-mail me or knows anywhere i can get it then i would be very grateful for a
reply.




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

Date: 26 Jan 1999 20:49:13 GMT
From: lars@wolery.bu.edu (Lars Kellogg-Stedman)
Subject: Problems during build: segfault during autosplit
Message-Id: <slrn7asag6.bji.lars@wolery.bu.edu>

I'm trying to build Perl 5.005_02 under Irix 6.5.  I'm seeing the following
errors at the end of the build process:

        AutoSplitting perl library
LD_LIBRARY_PATH=/fs/wolery/src/perl5.005_02: ./miniperl -Ilib -e 'use
AutoSplit; \
        autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm
AutoSplitting lib/POSIX.pm (lib/auto/POSIX)
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12579.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12584.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12589.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12594.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12602.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12607.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12612.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12617.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12622.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12627.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12632.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12637.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12642.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12647.
Bad free() ignored at lib/AutoSplit.pm line 312, <IN> chunk 12652.
make: *** [preplibrary] Segmentation fault

I'm building with sfio, a shared libperl, perl's malloc(), and perl IO turned
on.

Any ideas?  If you've run into this before and found a way around it,
please let me know.

Thanks,

-- Lars


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

Date: Tue, 26 Jan 1999 15:45:23 -0500
From: "Laran Coates" <lcoates@bu.edu>
Subject: Recursively reading files
Message-Id: <78l9iu$hii$1@news1.bu.edu>

I want to write a script to read through all files within a directory tree.
In other words I want the script to open and read the root directory,
perform an operation on each file within that directory and all of the files
within all of the other directories within that directory.

I have written this so far but think that there is something missing.

Could someone please take a look and let me know if you have any
suggestions.

Thanks.

#!/usr/bin/perl -w

opendir(DIR, /www/cme);
@files = readdir(DIR);

foreach $file (@files) {
 if ( -d $file )

  opendir (SUBDIR, $file);
  @files = readdir (SUBDIR);
  foreach $file (@files) {
   while<> { $_ =~
s/\/med-www.bu.edu\/cme\//www.bumc.bu.edu\/www\/busm\/cme\/g; }
   }
  }
 else

 while<> { $_ =~
s/\/med-www.bu.edu\/cme\//www.bumc.bu.edu\/www\/busm\/cme\/g; }
 }
}

All help is appreciated.

Thanks.

Please reply by email.

Sincerely,

Laran Coates
lcoates@bu.edu







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

Date: 26 Jan 1999 13:51:53 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Recursively reading files
Message-Id: <36ae2ae9@csnews>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    "Laran Coates" <lcoates@bu.edu> writes:
:I want to write a script to read through all files within a directory tree.

Use the find tool -- remember that a tools-based approach
will always win over a monolith.

    perl -i.bak -pe 's/foo/bar/g' `find . -type f -print`

Or use the File::Find module for more elaborate work.

--tom
-- 
 "... the whole documentation is not unreasonably transportable in a
 student's briefcase." - John Lions describing UNIX 6th Edition
 "This has since been fixed in recent versions." - Kernighan & Pike


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

Date: Tue, 26 Jan 1999 20:12:06 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: stat() interpretation
Message-Id: <F66o46.Bty@news.boeing.com>

In article <78huld$k0h$1@nnrp1.dejanews.com>,
 <jimrsmith@unn.unisys.com> wrote:

>Can you tell me how I interpret the output from:
>@array = stat($filename) ;
>$mode = $array[2] ;
># print $mode at this point gives a number: 16877 for a subdirectory
>#                                           32742 for a file
>How do I translate this to read,write, execute permissions ?


The permissions are derived from AND'ing a bitmask with the
mode returned by stat. The familar mask bits 1=executable 2=write,
 ... etc. form the octal permission number. Take a look at the 
stat(2) manpage for more details.

So, masking off your directory file mode of 16877 

  $bitmask = 07777;
  $permissions = $mode & $bitmask; 
  printf("%04o\n", $permissions);      # prints 0755

Something that'd transform 0755 to 'rwr-xr-x' is left as
exercise for the energetic.


hth,
--
Charles DeRykus  


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

Date: Tue, 26 Jan 1999 19:34:15 GMT
From: droby@copyright.com
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <78l5bn$ago$1@nnrp1.dejanews.com>

In article <m3btjm21mw.fsf@joshua.panix.com>,
  Jonathan Feinberg <jdf@pobox.com> wrote:
> Greg Bacon <gbacon@cs.uah.edu> writes:
>
> > Top 10 Posters by Number of Posts
> > =================================
> [snip]
> >    30    40.9 ( 24.6/ 14.1/  9.3)  Jonathan Feinberg <jdf@pobox.com>
> >    28    80.9 ( 32.0/ 48.9/ 19.4)  topmind@technologist.com
>
> I'm not sure how to feel about that.
>

Perhaps we could add a poster-to-thread ratio into the stats and that would
make you feel better.

--
Don Roby

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 26 Jan 1999 15:41:14 -0500
From: "Laran Coates" <lcoates@bu.edu>
Subject: Trouble using perl under win98
Message-Id: <78l9b3$hdu$1@news1.bu.edu>

I have installed perl on my win 98 box.  I think that I may just need to
edit the path.  If that is the case am I correct in believing that all I
need to do is change my autoexec.bat to include the proper path?  If that is
not what I need to do I would appreciate any help to get perl running on my
box.

Please reply by email.  Thanks.

All help is appreciated.

Sincerely,

Laran Coates
lcoates@bu.edu





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

Date: Tue, 26 Jan 1999 18:54:43 GMT
From: ankadakia@hotmail.com
Subject: Re: Using a variable as a variable name
Message-Id: <78l31f$8cv$1@nnrp1.dejanews.com>

use ${$var} instead of ${var}

In article <36AD3A8C.1AAA1FD3@interaccess.com>,
  Bruce Hodo <bruceh@interaccess.com> wrote:
> I am having a slight problem with references. Here's what I'm trying to
> do:
>
> I have a perl script running with strict, and using CGI.pm. In a FOR
> loop I want to
> -set a variable $var = "string1'.$i.'string2';
> -append to another variable $output .= $cgi ->hidden( $var , ${var} )
> -end of loop
>
> What I want in the second parm of hidden is the VALUE of
> string2.$i.string2, not the name, so when I print $output, the contents
> of string2.$i.string2 are printed. What am I doing wrong?
>
> --
>                  Bruce Hodo - Webmaster, GetAwayNetwork, Inc.
>      ==Providing unique vacation information on the World Wide Web==
>        For Villas, Resorts, Hotels, Air/Hotel Packages, Charter Airfares
>
>                               And Now Offering Travel Auctions!
> =============== Visit us at http://getawaynet.com ===============
>
>

=======================
Beautify Your Existance
=======================

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 26 Jan 1999 14:01:21 -0500
From: Bruce Hodo <bruceh@interaccess.com>
Subject: Re: Using a variable as a variable name
Message-Id: <36AE1101.85A9090E@interaccess.com>

Let me clarify:

I have a perl script running with strict, and using CGI.pm. In a FOR
loop I want to
-set a variable $var = "string1'.$i.'string2'. This variable represents
a named parameter's name in a CGI object.
-append to another variable $output .= $cgi ->hidden( $var , ${var} )
The first parm is the named parameter's name, the second it the current
value of the named parameter as passed from a CGI form in the script
that called the current one.
-end of loop. This loop continues only the number of times it takes to
process each set of variables(there are numerous hidden tags creates.

When I print $output, the contents
of string2.$i.string2 are printed. What am I doing wrong?

--
                 Bruce Hodo - Webmaster, GetAwayNetwork, Inc.
     ==Providing unique vacation information on the World Wide Web==
       For Villas, Resorts, Hotels, Air/Hotel Packages, Charter Airfares

                              And Now Offering Travel Auctions!
=============== Visit us at http://getawaynet.com ===============




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

Date: Tue, 26 Jan 1999 14:22:21 -0500
From: "Greg Hassan" <greg@hassan.com>
Subject: Re: What's the character?
Message-Id: <36ae164c$0$16688@nntp1.ba.best.com>

Can't you just use \s+, any space character?

It should be \n though, if you are on a unix server.
Maybe try \r or \cM.

You could always use the escape function from
cgi.pm on the string.  That should rewrite those
characters in like hex format or whatever.

-Greg
--
===============================================================
  Greg Hassan, The Independent Solution (CGI,Java,SQL,Perl...)
http://www.hassan.com/, 1-607-225-4214, ICQ #: 8048297, E-Mail Preferred
===============================================================
Host many threaded, searchable discussion groups on your site:
    http://www.hassan.com/superbbs/

Host your own specialized internet search engine:
            http://www.hassan.com/site_searcher/

Sell your products in style, The Super Cart 1.6:
    http://www.hassan.com/shopcart/ (New demo)
===============================================================

<om7@cyberdude.com> wrote in message 78l12q$6hv$1@nnrp1.dejanews.com...
>I'm writing some code, whereby I do a listing and have the results put in
an
>array.
>
>What I'm storing is the following data, by doing "ls -1 dir1 dir2 dir3...".
>(That's a number one and not the letter l.)
>
>dir1:
>file1
>file2
>file3
>
>dir2:
>file4
>file5
>
>dir3:
>file6
>
>etc.
>
>I'm having trouble determining what the line separting the data is.  I've
>tested for it being undef and also a \n character, but that doesn't match.
I
>need to determine what it is and how to check for it.  I know I could get
>round it by checking if it's a string or something (or doing separate "ls
>-1"'s; I will do if I can't figure out anything else.  And I don't want to
do
>separate "ls -1" because that gives me a long list and I can't determine
what
>files came from which directory.
>
>Can anyone help??
>
>Thanks.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own




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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 4753
**************************************

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