[17210] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4632 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 16 18:06:15 2000

Date: Mon, 16 Oct 2000 15:05:23 -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: <971733922-v9-i4632@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 16 Oct 2000     Volume: 9 Number: 4632

Today's topics:
    Re: A Simpler perlish way (Craig Berry)
    Re: Access DB & Perl <jim@usjet.net>
        Bytemanipulating <josef.zellner@aon.at>
    Re: Bytemanipulating (Colin Watson)
    Re: Compiling Locally <was Why these 2 simple errors?> <Darryl.Friesen@usask.ca>
        Help - Subroutine within a Subroutine Illegal? <sg@loralskynet.com>
    Re: Help - Subroutine within a Subroutine Illegal? <jeffp@crusoe.net>
    Re: Help! binary files=losing my mind! richardstands@my-deja.com
    Re: Help! binary files=losing my mind! richardstands@my-deja.com
    Re: hookhook (??) undef operator <nospam-please.jnn@chello.se>
    Re: How to use .pl csript on IIS to send mail to NT Exc <james@NOSPAM.demon.co.uk>
    Re: How to use .pl csript on IIS to send mail to NT Exc <tony_curtis32@yahoo.com>
        MD5 Passwords in GNU/Linux <admin-at-efni-com@nospam.org>
        My hash ref prototype doesn't work <phrxy@csv.warwick.ac.uk>
        Parsing binary files <ajai@netscape.net>
    Re: Perl Module Installation <bh_ent@my-deja.com>
    Re: perl objects and methods <uri@sysarch.com>
        pod \n? <prlawrence@lehigh.edu>
    Re: pod \n? (Colin Watson)
        pod behaving badly <prlawrence@lehigh.edu>
    Re: pod behaving badly (John J. Trammell)
    Re: pod behaving badly <prlawrence@lehigh.edu>
    Re: prob with -F switch <anmcguire@ce.mediaone.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 16 Oct 2000 18:17:51 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: A Simpler perlish way
Message-Id: <sumhif24bllj09@corp.supernews.com>

Russ Jones (russ_jones@rac.ray.com) wrote:
: If Pope Gregory had only worried about calendars that would didn't
: have to run beyond his lifetime, by now the winter equinox would be in
: July.

I didn't realize he was Australian. :)  And, to be fair, the Julian
calendar would only have lost an additional 5 days (beyond the 11
corrected for in 1582) in the intervening years.

: If you have a script which is going to run long enough to care about
: individual leap years, how do you know that it won't still be running
: in 2100? Do it right or some other poor slob will have to fix it. And
: if there's any justice in the universe, it'll be you, either in this
: life or on the next turning of the wheel.

Amen to that!

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "Quidquid latine dictum sit, altum viditur."
   |


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

Date: Mon, 16 Oct 2000 13:30:37 -0500
From: "Jim Gaasedelen" <jim@usjet.net>
Subject: Re: Access DB & Perl
Message-Id: <IOHG5.537$gu5.238524@news.uswest.net>

Bottom line is that the Access Database needs to reside
in a windows environment.

"Ruediger Koch" <RuedigerKoch@web.de> wrote in message
news:8s4p57$pjp$1@news.fth.sbs.de...
>
> you could use DBI::Proxy. The windows server connects via odbc to access
and
> the unix client sends his requests to the proxy server.
>
> Its not as hard as it sounds. Hope it helps
>
> Neb <berube@odyssee.net> schrieb in im Newsbeitrag:
> U5bF5.862$hH2.16757@news.globetrotter.net...
> > Hi,
> >
> > Is there a way to use a MS Access database in a Perl script without
using
> > ODBC?  For example, on a Unix server?  I want to be able to query the
> > database using SQL.  Is this possible?
> >
> > thanks in advance,
> >
> > neb
> >
> >
> >
> >
>
>
>




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

Date: Mon, 16 Oct 2000 20:15:34 +0000
From: Joe <josef.zellner@aon.at>
Subject: Bytemanipulating
Message-Id: <39EB61E6.969BC6C9@aon.at>

Hi all!
I need to know how I can manipulate a byte. I need to set the first
three bits of a byte independent to the last five bits.

Can anyone tell me how i can do this?

thx


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

Date: 16 Oct 2000 21:37:44 GMT
From: cjw44@flatline.org.uk (Colin Watson)
Subject: Re: Bytemanipulating
Message-Id: <8sfsf8$4qb$1@riva.ucam.org>

Joe <josef.zellner@aon.at> wrote:
>I need to know how I can manipulate a byte. I need to set the first
>three bits of a byte independent to the last five bits.

This is largely the same in any language with bitwise operations, e.g. C
or Java. If you don't know how the bitwise operators work in Perl, see
'perldoc perlop'.

  $byte |= 0xE0;  # binary 11100000

Resetting can be done with '&' (using 1s for bits to ignore), and
toggling with '^' (using 0s for bits to ignore).

-- 
Colin Watson                                     [cjw44@flatline.org.uk]
"Abandon the search for Truth; settle for a good fantasy."


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

Date: Mon, 16 Oct 2000 13:28:23 -0600
From: "Darryl Friesen" <Darryl.Friesen@usask.ca>
Subject: Re: Compiling Locally <was Why these 2 simple errors?>
Message-Id: <8sfksj$j1e$1@tribune.usask.ca>

> Now that I still have the zlib library and the Compress/Zlib module left
> to install, I'm wondering if it would be easier to attempt installs with
> CPAN.pm. Most servers appear to have that module installed. Doesn't that
> module allow you to install into any directory?

Nope.  cpan just automates the download, make, and install (well, it does
other good stuff too), so if you can't run cc, neither can it.

I think your best bet is to ask them (a) how to use cc, or (b) to install
the modules you need.  Reasonable hosting services/ISP's should have no
problem with your request.


- Darryl

 ----------------------------------------------------------------------
  Darryl Friesen, B.Sc., Programmer/Analyst    Darryl.Friesen@usask.ca
  Education & Research Technology Services,     http://gollum.usask.ca/
  Department of Computing Services,
  University of Saskatchewan
 ----------------------------------------------------------------------
  "Go not to the Elves for counsel, for they will say both no and yes"





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

Date: Mon, 16 Oct 2000 15:57:47 -0400
From: Stephan Gross <sg@loralskynet.com>
Subject: Help - Subroutine within a Subroutine Illegal?
Message-Id: <pjmmus4icpsh3epfjoiqvingq0irpp1m9u@4ax.com>

I'm using Win32::GUI.  I have a subroutine that pops up an Error
Window with the error text passed to it:

sub ErrorWindow()
{
 my $ErrMsg = $_[0];

 # instantiate window
 $ErrorWindow = new Win32::GUI::Window
 (
    -name	  =>   "ErrorWindow",
    -text	  =>   "Error Message!!",
    -left	  =>   10,
    -top	  =>   10,
    -width	  =>   500,
    -height	  =>  200,
  );
  AddLabel($ErrorWindow,$ErrMsg,20,20,boxwidth(80),boxheight(1.2));
  AddButton($ErrorWindow,"Ack",100,100,$bwidth,$bheight);
  $ErrorWindow->Show();
}

As you can see, it calls other subroutines to pop up the label and
button.

I have another subroutine that calls this one when an error occurs:

sub xyz()
{
  $var = "Mistake";
   ErrorWindow("$var");
}

As soon as I run this, I immediately get the error message:
Too many arguments for main::ErrorWindow near ""$var")"

If I remove the argument
sub xyz()
{
  $var = "Mistake";
   ErrorWindow();
}

it does not give an error and the Error Window pops up, but of course
there is no text in it.

Any suggestions?
================================================================
Stephan Gross          Loral Skynet           sg@loralskynet.com
Senior Software Engineer                      908-470-2388


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

Date: Mon, 16 Oct 2000 16:25:51 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: Help - Subroutine within a Subroutine Illegal?
Message-Id: <Pine.GSO.4.21.0010161625050.25707-100000@crusoe.crusoe.net>

[posted & mailed]

On Oct 16, Stephan Gross said:

>sub ErrorWindow()
>{
>}

>sub xyz()
>{
>  $var = "Mistake";
>   ErrorWindow("$var");
>}

>Too many arguments for main::ErrorWindow near ""$var")"

This is because you defined your function with an empty prototype, which
means it takes no arguments.  Remove the () from the definition of the
function.  This is not how functions are defined in Perl.

-- 
Jeff "japhy" Pinyan     japhy@pobox.com     http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine            http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc.    http://www.perlarchive.com/
CPAN - #1 Perl Resource  (my id:  PINYAN)        http://search.cpan.org/





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

Date: Mon, 16 Oct 2000 19:03:48 GMT
From: richardstands@my-deja.com
Subject: Re: Help! binary files=losing my mind!
Message-Id: <8sfjed$u43$1@nnrp1.deja.com>

In article <39E78036.A60C553C@acm.org>,
  "John W. Krahn" <krahnj@acm.org> wrote:
> richardstands@my-deja.com wrote:
> >
> > Gah! I had a problem with Compress::Zlib(I am running ActiveState
Perl
> > 5.6.0) and tracked it down to file sizes. So I created a script that
> > simply opens a binary file and writes all the data in it to a new
> > binary file. However it only reads up to byte 1574 and then stops
as if
> > it were done. The original file is not corrupt or bad as Adobe
> > Photoshop can open it fine(the new file locks adobe up). What am I
> > missing here??
> >
> > The following perl code:
> >
> > use strict;
> > my $input = 'test.gif';
> > my $output = 'foo.gif';
> > my $buffer = '';
> > my $bytes;
> > binmode( IN );
> > binmode( OUT );
> > open( IN, "<$input" ) or die( $! );
> > open( OUT, ">$output" ) or die( $! );
> > print( "Size of input file is ", ( -s $input ), "\n" );
> > while ( 1 ) {
> >     $bytes = read( IN, $buffer, ( -s $input ) );
> >     print( "read in $bytes bytes\n" );
> >     print( OUT $buffer );
> >     last unless( $bytes > 0 );
> > }
> > close( IN );
> > close( OUT );
> > print( "Size of output file is ", ( -s $output ), "\n" );
> > exit( 1 );
> >
> > Prints:
> >
> > Size of input file is 174465
> > read in 1565 bytes
> > read in 0 bytes
> > Size of output file is 1574
> >
> > I'm sure the problem is something minor but I just can't see what's
> > wrong. Thanks!!!
>
> Change the order of these lines
>
> binmode( IN );
> binmode( OUT );
> open( IN, "<$input" ) or die( $! );
> open( OUT, ">$output" ) or die( $! );
>
> To
>
> open( IN, "<$input" ) or die( $! );
> binmode( IN );
> open( OUT, ">$output" ) or die( $! );
> binmode( OUT );
>
> John
>
Whew! That was it. What didn't help me is that the example script I
posted worked fine on our BSD server - go figure. Thanks a lot.

-Rich


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 16 Oct 2000 19:09:19 GMT
From: richardstands@my-deja.com
Subject: Re: Help! binary files=losing my mind!
Message-Id: <8sfjon$u9c$1@nnrp1.deja.com>

In article <39E776C0.22FD6B62@vpservices.com>,
  Jeff Zucker <jeff@vpservices.com> wrote:
> richardstands@my-deja.com wrote:
> >
> > binmode( IN );
> > binmode( OUT );
> > open( IN, "<$input" ) or die( $! );
> > open( OUT, ">$output" ) or die( $! );
>
> From perldoc -f binmode:
>
>   binmode() should be called after open() but before any I/O is
>   done on the filehandle.
>
> HTH,
>
> --
> Jeff
>
Yea, I obviously missed this in the documentation. My example worked on
our UNIX server so that sent me posting thinking maybe something else
was wrong but your post had the right solution and I thank you!

-Rich


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 16 Oct 2000 21:34:43 GMT
From: "jnn" <nospam-please.jnn@chello.se>
Subject: Re: hookhook (??) undef operator
Message-Id: <TvKG5.1870$DN.131570@nntp1.chello.se>

Interesting. Sounds as a nice shorthand.

Maybe the existence of special undef/defined operators could be =
justified in some cases. Undef/def pair is a kind of boolean but at the =
same time requires an extra layer of evaluation in programs (from the =
programmer's standpoint).

But for now I'll work ahead with defined(). :)

--=20
"Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li> skrev i =
meddelandet news:851lus4lk6f40p0ggd6icrs1im6vn6a0qt@4ax.com...
> On Mon, 16 Oct 2000 00:17:01 GMT, "jnn" <nospam-please.jnn@chello.se> =
wrote:
>=20
> > Hi Philip.
> >=20
> > What's a 'hookhook'?
>=20
> The question is, "What is 'hookhook'?". The answer is, it's the ?? =
operator (so
> called because some people call the question mark "hook" for faster =
speaking).
> It evaluates the left-hand side and returns that if it's defined, =
otherwise it
> evaluates the right-hand side and returns that. A little bit like the =
||
> operator, but operating on definedness and not truth.
>=20
> > How do you know if your Perl version supports it or not?
>=20
> Your Perl version supports it if you hacked the source to include it. =
It does
> not support it if you use a standard Perl distribution, such as the =
one from
> CPAN, or ActivePerl, or MacPerl. The feature was discussed and =
rejected for
> inclusion in the standard. However, at least one person submitted a =
patch that
> he used in his sources which would include this feature (though I =
believe he
> spelled it ||| instead); you might find it by grepping back =
perl5-porters
> archives. No, don't ask me what to search for; I don't remember the =
name of the
> thread or when it was.
>=20
> There was also a mailing list set up to discuss this operator and =
whether it
> should be included; however, it enjoyed resounding silence starting =
about a week
> or two after it was set up and is probably disbanded by now.
>=20
> Cheers,
> Philip



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

Date: Mon, 16 Oct 2000 19:24:18 +0100
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: How to use .pl csript on IIS to send mail to NT Exchange.
Message-Id: <ant161818354fNdQ@oakseed.demon.co.uk>

In article <8s7r51$fn8$1@news.panix.com>, Anthony Spina
<URL:mailto:aspina@panix.com> wrote:
> use Net::SMTP;
> no sendmail required.....

Do you know where to get Net::SMTP from?
I looked through CPAN several times and can't seem to find
anything with the name "Net::SMTP". Perhaps it is part of
another package?

-- 
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02



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

Date: 16 Oct 2000 14:13:14 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: How to use .pl csript on IIS to send mail to NT Exchange.
Message-Id: <87pul0ha5x.fsf@limey.hpcc.uh.edu>

>> On Mon, 16 Oct 2000 19:24:18 +0100,
>> James Taylor <james@NOSPAM.demon.co.uk> said:

> In article <8s7r51$fn8$1@news.panix.com>, Anthony Spina
> <URL:mailto:aspina@panix.com> wrote:
>> use Net::SMTP; no sendmail required.....

> Do you know where to get Net::SMTP from?  I looked
> through CPAN several times and can't seem to find
> anything with the name "Net::SMTP". Perhaps it is part
> of another package?

http://search.cpan.org/, enter "Net::SMTP" and there you
are.

hth
t
-- 
Eih bennek, eih blavek.


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

Date: Mon, 16 Oct 2000 19:22:29 GMT
From: Joshua Hirsh <admin-at-efni-com@nospam.org>
Subject: MD5 Passwords in GNU/Linux
Message-Id: <orkmusgj002l903i7fdc8cmce0185d4ns0@4ax.com>

Hullo Folks,

 Does anyone happen to know of a module to create valid MD5 based
passwords for use in /etc/shadow for GNU/Linux machines?

 I have some perl based scripts for doing password
administration/verification which worked perfectly with the previous
crypt implementations, but have yet to find a way to get them to work
using the MD5 crypted passwords.

 There was one module I found on CPAN, but it was a bit outdated and
didn't work as it should have. I believe the module was based off of
*BSD's implementation of MD5 Passwords?

 Any help would be greatly appreciated.

 Regards,

Joshua Hirsh


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

Date: Mon, 16 Oct 2000 22:15:04 +0100
From: "John J. Lee" <phrxy@csv.warwick.ac.uk>
Subject: My hash ref prototype doesn't work
Message-Id: <Pine.SOL.4.21.0010162206430.24573-100000@mimosa.csv.warwick.ac.uk>


The following script prints:

1
Use of uninitialised value at E:\Perl\site\bin\trial.pl line 17 (#1)

    (W) An undefined value was used as if it were already defined.  It was
    interpreted as a "" or a 0, but maybe it was a mistake.  To suppress this
    warning assign an initial value to your variables.


Why??  I know I'm going to kick myself when I find out what's wrong.


#!/usr/bin/perl -w

use diagnostics;
use strict;
use vars qw(%hash);

sub foo (\%$$) {
	my %foo = %{shift()};
	my $bar = shift;
	my $baz = shift;
	$foo{$bar} = $baz;
	print $foo{123}."\n";
}

foo(%hash, 123, 1);

print $hash{123}."\n";




Thanks for any help


John



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

Date: Mon, 16 Oct 2000 21:31:31 GMT
From: Ajai Khattri <ajai@netscape.net>
Subject: Parsing binary files
Message-Id: <8sfs3l$676$1@nnrp1.deja.com>

I am trying to parse a file where the characters \n\n^A^A are the
delimiters between each record. The <> operator by default reads one
line at a time - I wish to read multiple lines until I hit a delimiter.
Can't figure this out - any ideas?

--
Aj. (ajai@netscape.net)

--
Aj. (ajai@netscape.net)


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 16 Oct 2000 19:11:37 GMT
From: bh <bh_ent@my-deja.com>
Subject: Re: Perl Module Installation
Message-Id: <8sfjt1$ujj$1@nnrp1.deja.com>

In article <8sfd6b$o4m$1@nnrp1.deja.com>,
  bh <bh_ent@my-deja.com> wrote:
> Are there any known problems or issues regarding Module installation
> for Oracle databases for perl 5?  I am currently running perl
5.005.03.
>
> Any assistance would be greatly appreciated!
>
> Drew Myers
> perotsystems
>
> --
>
> bh
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

The modules I am installing are Bundle::DBI and DBD::Oracle.  I have
installed the cpan utility to automate the installation process.  Are
there any problems associated with installing these particular
modules?
--

bh


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 16 Oct 2000 21:06:52 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: perl objects and methods
Message-Id: <x7snpwts0i.fsf@home.sysarch.com>

>>>>> "G" == Godzilla!  <godzilla@stomp.stomp.tokyo> writes:


  G> I can write troll articles infinitely better than
  G> yours with half my brain tied behind my back, Frank.

at least you admit you troll, so why do you still do it? it does not
contribute anything of value here. but you have never contributed
anything of value here so far. it has been 6+ months and you still are
deluded about your abilities. take you cargo-cult half brain and troll
elsewhere. other than the occasional newbie, no one here will fall for
your shit.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Mon, 16 Oct 2000 16:46:46 -0400
From: "Phil R Lawrence" <prlawrence@lehigh.edu>
Subject: pod \n?
Message-Id: <8sfpdj$6i4@fidoii.CC.Lehigh.EDU>

Is there a way to make a carriage return in POD?  Currently, if I don't
indent the lines to make them interpret literally or put an extra line
between them they run together.

= head1 EXAMPLE

line_1
line_2

displays as:
EXAMPLE
line_1 line_2

Any help?
Phil R Lawrence




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

Date: 16 Oct 2000 21:53:40 GMT
From: cjw44@flatline.org.uk (Colin Watson)
Subject: Re: pod \n?
Message-Id: <8sftd4$53c$1@riva.ucam.org>

Phil R Lawrence <prlawrence@lehigh.edu> wrote:
>Is there a way to make a carriage return in POD?  Currently, if I don't
>indent the lines to make them interpret literally or put an extra line
>between them they run together.

When I want text printed with verbatim carriage returns, I tend to
indent it with spaces or tabs, though of course this means the entire
thing is verbatim. Would that be good enough for you?

I don't know of any other way, short of putting a .br in the roff output
(or the equivalent for other translators) manually.

-- 
Colin Watson                                     [cjw44@flatline.org.uk]
"Ammo is cheap, remember?" - The Internet Oracle


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

Date: Mon, 16 Oct 2000 13:56:37 -0400
From: "Phil R Lawrence" <prlawrence@lehigh.edu>
Subject: pod behaving badly
Message-Id: <8sffei$f6m@fidoii.CC.Lehigh.EDU>

_______SCRIPT__________
#!/usr/local/bin/perl -w

=head1 NAME

 count_records - a script to return row counts associated
 with a passed-in list of tables

=cut

use diagnostics;
<snip!>
_______________________

The above POD results in a strange problem, the string "with a passed-in
list of tables" is repeated with a close-quote when I perldoc count_records.
Does anyone know why?  It seems pretty mysterious to me.


___PERLDOC OUTPUT____

COUNT_RECORDS(1)16/Oct/2000 (perl 5.005, patch 03COUNT_RECORDS(1)



NAME
      count_records - a script to return row counts associated
      with a passed-in list of tables


      with a passed-in list of tables"

<snipped blank lines>
   Page 1                                         (printed 10/16/00)
_______________________




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

Date: 16 Oct 2000 19:56:57 GMT
From: trammell@nitz.hep.umn.edu (John J. Trammell)
Subject: Re: pod behaving badly
Message-Id: <slrn8ult0p.5ef.trammell@nitz.hep.umn.edu>

On Mon, 16 Oct 2000 13:56:37 -0400, Phil R Lawrence
<prlawrence@lehigh.edu> wrote:
[snip]
>=head1 NAME
>
> count_records - a script to return row counts associated
> with a passed-in list of tables
>
>=cut
[snip]

Try 'perldoc pod2man', 'perldoc Pod::Man'.  And what's up with
those leading spaces?  You want verbatim text or sumfin?

-- 
John J. Trammell
johntrammell@yahoo.com


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

Date: Mon, 16 Oct 2000 16:30:21 -0400
From: "Phil R Lawrence" <prlawrence@lehigh.edu>
Subject: Re: pod behaving badly
Message-Id: <8sfoeq$2ga@fidoii.CC.Lehigh.EDU>


"John J. Trammell" <trammell@nitz.hep.umn.edu> wrote in message
news:slrn8ult0p.5ef.trammell@nitz.hep.umn.edu...
> On Mon, 16 Oct 2000 13:56:37 -0400, Phil R Lawrence
> <prlawrence@lehigh.edu> wrote:
> [snip]
> >=head1 NAME
> >
> > count_records - a script to return row counts associated
> > with a passed-in list of tables
> >
> >=cut
> [snip]
>
> Try 'perldoc pod2man', 'perldoc Pod::Man'.  And what's up with
> those leading spaces?  You want verbatim text or sumfin?

Good tip.  Also http://world.std.com/~swmcd/steven/perl/program_pod.html was
helpful.

Phil R Lawrence




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

Date: Mon, 16 Oct 2000 13:01:14 -0500
From: "Andrew N. McGuire " <anmcguire@ce.mediaone.net>
Subject: Re: prob with -F switch
Message-Id: <Pine.LNX.4.21.0010161300500.25136-100000@hawk.ce.mediaone.net>

On Mon, 16 Oct 2000, stevezaz@my-deja.com quoth:

> I am trying to run Perl with -a -n switches to read through a text file
> and split each line into the @F array.I would like to change the
> default field delimiter with -F switch but it doesn't work.I have tried
> quotes backslashes and everything else.
> Has anyone had this problem and what is the solution.
> Thanks!


perl -F':' -pale '$_=$F[0]' /etc/passwd

anm
-- 
$ # = "%.6g" ; stat $0 or die $! ;
_ = q.Just another Perl Hacker.  ;
print $ #                        ;
main'_ . v10                     ;



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

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 V9 Issue 4632
**************************************


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