[18245] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 413 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 4 14:10:44 2001

Date: Sun, 4 Mar 2001 11:10:18 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <983733018-v10-i413@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 4 Mar 2001     Volume: 10 Number: 413

Today's topics:
    Re: Para mode and <STDIN> <stephen@twocats.dont-spam.demon.co.uk>
    Re: Perl Internals <gellyfish@gellyfish.com>
    Re: Perl Newbie 2 questions <iltzu@sci.invalid>
    Re: Perl Newbie 2 questions <mjcarman@home.com>
    Re: Perl Newbie 2 questions <bwalton@rochester.rr.com>
    Re: Perl Newbie 2 questions <godzilla@stomp.stomp.tokyo>
    Re: Perl, Cookies, and Apache. <gellyfish@gellyfish.com>
    Re: Perl/DBD Question - Suppressing error messages for  <gellyfish@gellyfish.com>
    Re: REVISED: Hash/array woes... (Tad McClellan)
    Re: REVISED: Hash/array woes... (OTR Comm)
        shebang line not working <mfahey@www.wenqiong.com>
    Re: shebang line not working <scottb@wetcanvas.com>
    Re: shebang line not working <bart.lateur@skynet.be>
    Re: shebang line not working (Garry Williams)
    Re: shebang line not working (Abigail)
    Re: shebang line not working <mkonicki@uswest.net>
    Re: shell environement variables <gellyfish@gellyfish.com>
    Re: Uploading a file <iltzu@sci.invalid>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 4 Mar 2001 15:02:53 -0000
From: "Stephen Collyer" <stephen@twocats.dont-spam.demon.co.uk>
Subject: Re: Para mode and <STDIN>
Message-Id: <983719499.10425.0.nnrp-08.9e98901a@news.demon.co.uk>


Stephen Collyer <stephen@twocats.dont-spam.demon.co.uk> wrote in message
news:983623452.4177.0.nnrp-02.9e98901a@news.demon.co.uk...
>

> Right, the penny's finally dropped - it's a trivial problem: with
> $/ = '', perl does *not* return the terminator with data when
> <STDIN> returns, so the original loop:
>
> while(<STDIN>)
> {
>     print;
> }
>
> has nothing to flush the buffer with, even in line mode.


>
> I'm not sure I'd call that a quirk. However, <STDIN> does
> something different with terminators when $/ = "\n" and when
> $/ = '' - I'd call that a quirk, if a relatively trivial one.

Please ignore all of this, as it's top quality, prime BS.
$/='' does *not* cause Perl to behave differently w.r.t returning
terminators. $/ = '' does, OTOH, confuse morons such as myself.

Steve Collyer
Netspinner




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

Date: 4 Mar 2001 17:32:12 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Internals
Message-Id: <97tu6s$p74$1@orpheus.gellyfish.com>

On Sat, 3 Mar 2001 16:17:45 -0500 Eduard Grinvald wrote:
> Hello All!!
> Is there any place where i can determine how perl internally represents data
> types and objects. Mostly, i need to know the level of number precision and
> how many bytes do references, ints, hashes, etc take up.
> 

This kind of stuff is not documented, you will have to consult the
Perl source code.


/J\
-- 
Jonathan Stowe                      |     
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: 4 Mar 2001 16:52:09 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Perl Newbie 2 questions
Message-Id: <983724332.23327@itz.pp.sci.fi>

In article <3AA1C117.FB467D66@rochester.rr.com>, Bob Walton wrote:
>Aaron Cline wrote:
>> 
>>         [123423.234234.236868388.3849293949394.29429398]
>> 
>> I want to grab the number (including periods) into a variable.  I am
>> currently accomplishing it with a couple of "split" commands, but I'm
>> sure there's a better, more efficient way.
>
>    @numbers=split /[].[]/,$line;

What?  That regexp just doesn't..  oh, right, it does.  You're splitting
on any of ']', '.' or '['.  It doesn't match the OP's requirements very
well, however.


>    ($variable)=$line=~/\[([^]]*)\]/;

This looks better, though you're grabbing anything between brackets,
which might not be specific enough.  I'd suggest:

  my ($variable) =  $line =~ /\[([0-9.]+)\]/ ;

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"/* If you don't understand, don't touch */"  -- Abigail in the monastery



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

Date: Sun, 04 Mar 2001 17:53:22 GMT
From: Michael Carman <mjcarman@home.com>
Subject: Re: Perl Newbie 2 questions
Message-Id: <3AA282DA.4E3427D8@home.com>

[Post reordered to follow the flow of time as seen by us mere mortals.]

Aaron Cline wrote:
> 
> "Bob Walton" <bwalton@rochester.rr.com> wrote:
>>
>> If you want to just get whatever is between the brackets in
>> to a variable, that could be done with:
>>
>>     ($variable)=$line=~/\[([^]]*)\]/;
>
> I appreciate your post very much, however, can you tell me 
> exactly what 
>
> ($variable)=$line=~/\[([^]]*)\]/;
>
> all means?  Too many symbols for me to follow it.

It's a regular expression. Regex's are very powerful string-processing
tools that makes Perl tremendously useful. They're also hell to read
until you learn the syntax. You should read the perlre manpage to get
started on understanding them.

I'll try to explain this one using the the extended syntax:

($variable) =
  $line =~ /
    \[     # A literal '[' character
    (      # Begin backreference capture
    [^]]*  # Character class ([]) of anything except (^) 
           # a ']' character, zero or more times (*)
    )      # End backreference capture
    \]     # A literal ']' character
    /x;

> Could it also be written as $variable=($line =~ /\[([^]]*)\]/);

No, because the context (scalar vs list) is wrong. The former will
return what was sucessfully matched and captured between the () of the
regex. The latter will return 1 or 0 -- i.e. a true/false value as to
whether or not the match was successful. If you really hate to see
$variable in parenthesis, you could write it this way:

$variable = ($line =~ /\[([^]]*)\]/)[0];

This makes an anonymous array out of the regex and returns the first
match (the zeroth element).

-mjc


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

Date: Sun, 04 Mar 2001 18:21:19 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Perl Newbie 2 questions
Message-Id: <3AA287F5.8930907@rochester.rr.com>

Aaron Cline wrote:
> 
> In article <3AA1C117.FB467D66@rochester.rr.com>, "Bob Walton"
> <bwalton@rochester.rr.com> wrote:
> 
> I appreciate your post very much, however, can you tell me exactly what
> 
> ($variable)=$line=~/\[([^]]*)\]/;
> 
> all means?  Too many symbols for me to follow it.

    ($variable) 

is a list.

    ($variable)= 

is a list that gets assigned to.  Since the elements (actually element
in this case) are all lvalues, Perl will assign each lvalue to the
elements of the list on the RHS (right hand side) of the =.

    $line=~/.../

is a regular expression match.  It will apply the regular expression
between the /'s to variable $line.  Since it is in list context (by
virtue of the LHS of the = being a list), any of the $1, $2, etc
variables which are assigned will become the elements of the RHS list in
turn (our regex generates only one of these, so it will be one-element
list, which is appropriate for our LHS).

The regex is:

    \[([^]]*)\]

The \ is a regex metacharacter quote character, meaning that the
following character, [, will be used literally, even though it
ordinarily has special meaning in a regex (start of a character class). 
Thus, \[ will match the first [ in $line.

The ( is a parentheses group start, which group will, if the regex
inside the ()'s is matched, assign the matched result to the next $1,
$2, $3, etc variable available (in this case, $1).  The ) is the end of
the parentheses group.

The regex inside the ()'s is [^]]*.  The outer [] pair indicates this is
a character class.  The character class starts with a ^, indicating it
is an inverted character class (matching any character *not*
specified).  Since the first character of the character class is a ],
the ] is taken literally (this is a special case to enable one to place
a ] inside a character class).  Thus, [^]] will match any character this
is not a ].  The * means "repeat the previous regex term zero or more
times, greedily".  Thus, [^]]* will match the longest possible string
which does not include a ].  I used that character class rather than the
simpler .* so that in the event there is more than one entity of the
form [nnn.nnn...nnn] in $line (where n is a digit), it would take the
first one, rather than including possibly a large number of ]'s in the
match (that's a trick that comes with experience).  Note that you could
substitute lots of other goodies in here, like maybe:

    [\d.]*

which would be the longest possible string consisting of just digits and
periods.  But one glitch like a negative number would cause that to fail
to match.  And its obfuscation level isn't as high :-).

Finally, the \] is a literal ], which will match the ] at the end of
your expression.  The whole thing will start matching the first [
anywhere in $line, followed by the longest possible string not
containing a ], followed by a ]. The string between the [ and ] will be
assigned to variable $1, and, subsequently, to $variable.  An
experienced Perl programmer can write stuff like this without even
pausing to think about it.

You need to get the book "Learning Perl" and master it.  Also, read the
docs on your hard drive:

    perldoc perlop
    perldoc perlre

etc.

> 
> Could it also be written as $variable=($line =~ /\[([^]]*)\]/);

What did it do when you tried it?  Did it give you the results you
expected? See if you can decipher from the documentation just what that
expression will do.

 ...
-- 
Bob Walton


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

Date: Sun, 04 Mar 2001 10:57:49 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Perl Newbie 2 questions
Message-Id: <3AA2902D.F985412A@stomp.stomp.tokyo>

Aaron Cline wrote:

(snippage)

> I need to know how to search though a screen returned
> from a program...

This is not possible. You cannot search a display screen.

> ...that has a bunch of numbers surrounded by
> brackets and put just the number into a variable.
 
>  [123423.234234.236868388.3849293949394.29429398]
 
> I want to grab the number (including periods) into a variable.


TEST SCRIPT:
____________

#!perl

print "Content-type: text/plain\n\n";

$input = "[123.456.789]";

$number = $input;

$number =~ tr/[]//d;

print "Number: $number";

exit;


PRINTED RESULTS:
________________

Number: 123.456.789



Rather simple, yes?

Godzilla!


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

Date: 4 Mar 2001 18:33:03 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl, Cookies, and Apache.
Message-Id: <97u1ov$pm5$1@orpheus.gellyfish.com>

On Sat, 03 Mar 2001 11:08:10 GMT Parrot wrote:
> 
> David Ness <DNess@Home.Com> wrote in message
> news:3AA08D28.8278407@Home.Com...
>> Parrot wrote: Actually, I think you ought to get a little experience
>> helping others for a few months or a year before you start to have
>> strong opinions about what makes `a life' for others.
>>
>> You can, of course, form your opinions however you want, but unless you
>> have
>> some very substantial experience with very long threads, missing
>> posts, and been actively involved in giving help your opinion that
>> `placement of a quote' is not very important is simply ill-informed.
> 
> I'm not ill informed - I've been the co-op of BBS's many times, once on one
> that had a very active programming message section.  I looked through every
> message - and my help was quite often actively sought out.  So you see, I
> have experience helping others and reading long threads.


OK, OK, Shall we then agree to call this the 'house style' - a 'dress code'.

This is what people prefer around here and I think rather than complaining
about it you might just want to comply quietly.

<oh bollocks back into dumb flame wars :>

/J\
-- 
Jonathan Stowe                      |     
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: 4 Mar 2001 18:56:42 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl/DBD Question - Suppressing error messages for "normal" errors
Message-Id: <97u35a$pvj$1@orpheus.gellyfish.com>

On Tue, 27 Feb 2001 14:29:35 -0700 Bill Border wrote:
> Hi All,
> 
>   I am working on a DBD program where I insert a row into an Oracle table
> with a unique index. It is normal for this call to get a SQL error when
> there
> is a duplicate row. I do handle the error after the call with $dbh->err;
> Here
> is my question: how do I prevent this error:
> 
> DBD::Oracle::db do failed: ORA-00001: unique constraint (DBAMON.HISTORY_X1)
> violated (DBD ERROR: OCIStmtExecute) at /opt/dbamon/lib/histCreate.pl line
> 28.
> 
> from displaying on STDOUT???
> 

Either set PrintError => 0 in the connect arguments or wrap the execute
call in an eval {} block.

/J\
-- 
Jonathan Stowe                      |     
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: Sun, 4 Mar 2001 11:00:44 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: REVISED: Hash/array woes...
Message-Id: <slrn9a4plc.1hk.tadmc@tadmc26.august.net>


[ Please put your comments *following* the quoted text that you
  are commenting on.

  Please do not quote an entire article.

  Please do not quote .sigs

  Thanks.

  Jeopardectomy performed.
]


scott <unixman@mindspring.com> wrote:
>Tad McClellan wrote:

>> Post some input data, and the corresponding desired output
>> (and don't fluff up the output with HTML, you can add that later).

>Tad - thanks much for the response.  However, what I posted as an example
>of an output model, along with the description of the three database
>columns, make for a pretty generic problem.  I'll try to put a bit more
>meat on the problem here:


Your description of the problem was fine, I did not comment on that.

You did not provide matching input/output data, _that_ is what I was
commenting on.

Now that you have, below is code to make the transformation  :-)


>The values are fetched from a database table, 


That is red-herring information that we do not need to help you
devise the algorithm you need. You should filter-out characteristics
that can be filtered out.

All we need to know is "I have these 3 values". Where the values
came from is not germane to the problem to be solved. My program
below illustrates one technique that can be used to remove the
reliance on the DB stuff.


>with three relevant columns:
>ID, NAME, PARENT_ID.  Consider this mock data:

[snip input data, it is included in the code below]

>Given the above data, the perl sub should spit out a scalar formatted for
>an HTML SELECT list (Replacing HTML chevrons with brackets for ease of
>reading):
>
>[OPTION VALUE=1] Sports
>[OPTION VALUE=4] ... Football
>[OPTION VALUE=9] ........Draft Picks
>[OPTION VALUE=5] ... Baseball
>[OPTION VALUE=6] ... Soccer
>[OPTION VALUE=2] Investing
>[OPTION VALUE=7] ... Mutual Funds
>[OPTION VALUE=8] ... Online Trading
>[OPTION VALUE=3] Computers
>
>Currently, I slurp the table (it's fairly small) and create the following
>structure:
>
>while(@result = $sth->fetchrow_array) {
>      $channel_hash{$result[0]} = [($result[1], $result[2])];
>}
>
>For a frame of reference above, 


If you use a hash instead of an array, then you won't need to add
that kind of explanation. "What is what" will be documented in the
code itself.


>result[0] is the ID, result[1] is the NAME,
>and result[2] is the PARENT_ID.

   $channel_hash{$result[0]} = { name   => $result[1],
                                 parent => $result[2]
                               };

>My challenge is to cobble up working code to actually navigate the data
>structure as quickly and as efficiently as possible, and of course, spit
>out the actual code.


-------------------------------
#!/usr/bin/perl -w
use strict;

### collect up the node data
my %channel_hash;
while ( <DATA> ) {
   chomp;
   my($id, $name, $parent) = split /,/;

   $channel_hash{$id} = { name   => $name,  
                          parent => $parent,
                          kids   => []   # a list of the children node IDs
                        };
}

#### collect up a list of children IDs for each node
foreach my $node ( keys %channel_hash ) {
   my $parent = $channel_hash{$node}{parent};
   push @{$channel_hash{$parent}{kids}}, $node;
}

### output with recursive subroutine
my $depth = 0;  # for deciding indent level
foreach my $child ( sort @{$channel_hash{0}{kids}} ) { # children of the root
   walk($child);
}


sub walk {
   my($id) = @_;

   print '.' x ($depth * 4), $channel_hash{$id}{name}, "\n";

   $depth++;
   foreach my $child ( @{$channel_hash{$id}{kids}} ) {
      walk($child);
   }
   $depth--;
}

__DATA__
1,Sports,0
2,Investing,0
3,Computers,0
4,Football,1
5,Baseball,1
6,Soccer,1
7,Mutual Funds,2
8,Online Trading,2
9,Draft Picks,4
-------------------------------


Hope that helps!


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 04 Mar 2001 17:16:56 GMT
From: otrcomm***NO-SPAM***@wildapache**NO-SPAM***.net (OTR Comm)
Subject: Re: REVISED: Hash/array woes...
Message-Id: <3aa277a6.2538135936@news.wildapache.net>

Ron,

I downloaded Tree::Nary from CPAN and Tree::Explorer from your site.

Tree::Nary installed okay. However, I get an error trying to install
Tree::Explorer:

*********************

[root@sec CGI-Explorer-1.00]# perl Makefile.PL

After installation of CGI::Explorer, you must copy the /images 
directory from the distribution to your web server's document root. 
Then copy ce.pl to your cgi-bin directory, and make it executable. 

Checking if your kit is complete...
Looks good
Could not eval '
            package ExtUtils::MakeMaker::_version;
            no strict;

            local $VERSION;
            $VERSION=undef; do {
                our $VERSION = '1.00';
            }; $VERSION
        ' in Explorer.pm: Can't modify subroutine entry in scalar
assignment at (eval 7) line 7, at EOF

****************

Is this a problem with my 'MakeMaker' ?

Thanks,
Murrah Boswell

On Sun, 4 Mar 2001 12:36:01 +1100, "Ron Savage" <ron@savage.net.au>
wrote:

>See below.
>--
>Cheers
>Ron  Savage
>ron@savage.net.au
>http://savage.net.au/index.html
>scott <scott@scott.com> wrote in message news:3AA18473.851A44BF@scott.com...
>
>[snip]
>
>> What I am trying to do is build an HTML select list using this data,
>> where the output might look like:
>>
>> CATEGORY 1
>>     Subcategory 1
>>     Subcategory 2
>>         Sub-Subcategory 1
>>         Sub-Subcategory 2
>> CATEGORY 2
>>     Subcategory 1
>>     Subcategory 2
>> CATEGORY 3
>> CATEGORY 4
>>
>
>CGI::Explorer is designed to display this sort of data: http://savage.net.au/Perl.html
>
>
>



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

Date: Mon, 05 Mar 2001 06:27:10 +0800
From: Michael Fahet <mfahey@www.wenqiong.com>
Subject: shebang line not working
Message-Id: <3AA2C13E.740B9D1C@www.wenqiong.com>

Hello,

After compiling 5.6.0 on LinuxPPC, I can't seem to get the shebang line
to work.   Perl, Perl 5.6.0 and Perl6 are all in  /usr/local/bin, but
the followring test script work won't work if I type test.pl at the
command line.


#! usr/local/bin/perl

print  "Goodbye, cruel world!\n";
unlink $0;

The command line simply complains : test.pl: command not found.

But if I run perl test.pl from the command line, the script works fine.

TIA

Michael Fahey




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

Date: Sun, 04 Mar 2001 09:38:37 -0800
From: Scott Burkett <scottb@wetcanvas.com>
Subject: Re: shebang line not working
Message-Id: <3AA27D9D.E375C3C8@wetcanvas.com>

Michael, try:

#!/usr/local/bin/perl

Cheers.
Scott

Michael Fahet wrote:

> Hello,
>
> After compiling 5.6.0 on LinuxPPC, I can't seem to get the shebang line
> to work.   Perl, Perl 5.6.0 and Perl6 are all in  /usr/local/bin, but
> the followring test script work won't work if I type test.pl at the
> command line.
>
> #! usr/local/bin/perl
>
> print  "Goodbye, cruel world!\n";
> unlink $0;
>
> The command line simply complains : test.pl: command not found.
>
> But if I run perl test.pl from the command line, the script works fine.
>
> TIA
>
> Michael Fahey



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

Date: Sun, 04 Mar 2001 14:49:33 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: shebang line not working
Message-Id: <vfl4ats5feqhmr7ks0d9ihb26uk2qauudf@4ax.com>

Michael Fahet wrote:

>#! usr/local/bin/perl

I think you need a slash before the "usr". And is that path even
correct? Does it work if you do "/usr/local/bin/perl test.pl"?

-- 
	Bart.


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

Date: Sun, 04 Mar 2001 15:01:02 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: shebang line not working
Message-Id: <OMso6.233$mU5.10741@eagle.america.net>

On Mon, 05 Mar 2001 06:27:10 +0800, Michael Fahet
<mfahey@www.wenqiong.com> wrote:

>After compiling 5.6.0 on LinuxPPC, I can't seem to get the shebang line
>to work.   Perl, Perl 5.6.0 and Perl6 are all in  /usr/local/bin, but
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^

>#! usr/local/bin/perl
   ^
It seems this is a different path than the one above.  

But that's _not_ the problem you describe below.  

>print  "Goodbye, cruel world!\n";
>unlink $0;
>
>The command line simply complains : test.pl: command not found.

Your shell has searched your path and it is unable to find an
executable file in your path with that name.  If your script is
executable, then use ./test.pl to make its location known to your
shell.  

-- 
Garry Williams


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

Date: 4 Mar 2001 15:50:34 GMT
From: abigail@foad.org (Abigail)
Subject: Re: shebang line not working
Message-Id: <slrn9a4p2a.ifu.abigail@tsathoggua.rlyeh.net>

Michael Fahet (mfahey@www.wenqiong.com) wrote on MMDCCXLII September
MCMXCIII in <URL:news:3AA2C13E.740B9D1C@www.wenqiong.com>:
`` Hello,
`` 
`` After compiling 5.6.0 on LinuxPPC, I can't seem to get the shebang line
`` to work.   Perl, Perl 5.6.0 and Perl6 are all in  /usr/local/bin, but
`` the followring test script work won't work if I t/|\ test.pl at the
`` command line.                                     |
                                                     |
You got perl6 in there? Wow.                         |
                                                     |
`` #! usr/local/bin/perl                             |
    /|\                                              |
     |                                               |
     +-----------------------------------------------+


Duh!



Abigail
-- 
:$:=~s:$":Just$&another$&:;$:=~s:
:Perl$"Hacker$&:;chop$:;print$:#:


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

Date: Sun, 4 Mar 2001 10:57:24 -0700
From: "Peggy Konicki" <mkonicki@uswest.net>
Subject: Re: shebang line not working
Message-Id: <Ynvo6.1087$hZ4.267862@news.uswest.net>

You are missing a  /  in front of usr in your shebang line
should be:     #!/usr/local/bin/perl

"Michael Fahet" <mfahey@www.wenqiong.com> wrote in message
news:3AA2C13E.740B9D1C@www.wenqiong.com...
> Hello,
>
> After compiling 5.6.0 on LinuxPPC, I can't seem to get the shebang line
> to work.   Perl, Perl 5.6.0 and Perl6 are all in  /usr/local/bin, but
> the followring test script work won't work if I type test.pl at the
> command line.
>
>
> #! usr/local/bin/perl
>
> print  "Goodbye, cruel world!\n";
> unlink $0;
>
> The command line simply complains : test.pl: command not found.
>
> But if I run perl test.pl from the command line, the script works fine.
>
> TIA
>
> Michael Fahey
>
>




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

Date: 4 Mar 2001 18:58:09 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: shell environement variables
Message-Id: <97u381$pvm$1@orpheus.gellyfish.com>

In comp.lang.perl.misc Alan Coopersmith <alanc@alum.calberkeley.org> wrote:
> "Gregory Toomey" <gtoomey@usa.net> writes in comp.unix.solaris:
> |There is a linux command called "source" which runs a script as part of the
> |current process
> |and does not invoke a new shell.
> 
> Believe it or not, "source" is NOT a linux command but a built-in
> feature of UNIX shells since long before linux was created.  ("source"
> is the csh/tcsh equivalent of sh/ksh's "." built-in command.)
> 

Nope I believe it :)

/J\
-- 
Jonathan Stowe                      |     
<http://www.gellyfish.com>          |      This space for rent
                                    |


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

Date: 4 Mar 2001 16:59:34 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Uploading a file
Message-Id: <983725086.23931@itz.pp.sci.fi>

In article <v7no6.212$mU5.9428@eagle.america.net>, Garry Williams wrote:
>
>On a Windows machine:
>  $ perl -wle 'print map { " " . ord } split //, "test\n"'
>   116 101 115 116 10
>
>On a Unix machine: 
>  $ perl -wle 'print map { " " . ord } split //, "test\n"'
>   116 101 115 116 10
>
>Hmm.  No difference.  In other words, "\n" is _always_ interpolated as
>the ASCII newline character no matter what the OS or hardware.  

You didn't test on a Mac, did you?

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"There's apparently something about the aerodynamics of the female body the
 requires exposed cleavage in order to perform a drop-kick.  Seven hundred
 Hollywood movies can't be wrong, can they?"   -- Kevin Russell in r.a.sf.c

Please ignore Godzilla / Kira -- do not feed the troll.


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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


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