[21917] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4121 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 14 18:11:45 2002

Date: Thu, 14 Nov 2002 15:10:19 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 14 Nov 2002     Volume: 10 Number: 4121

Today's topics:
        OT Re: help with Win32::OLE MS Word <brian_helterline@hp.com>
    Re: Possible solution for too long list problem request (Bryan Castillo)
        Redhat 8.0 and Perl <jcalvert@no.spam.canspec.com>
    Re: Redhat 8.0 and Perl <nospam@nospam.com>
    Re: Redhat 8.0 and Perl BreadWithSpam@fractious.net
    Re: Redhat 8.0 and Perl (Tad McClellan)
    Re: Redhat 8.0 and Perl <tk@WINDOZEdigiserv.net>
        Sending veriables to pl script using hyperlinks <g0khaasa@cdf.toronto.edu>
    Re: Sending veriables to pl script using hyperlinks <oskari.tanner@nospam-zerodistance.org>
    Re: some help with a print statement requested - double <mbudash@sonic.net>
    Re: Sort multidimensional hash? <user@server.com>
    Re: Sort multidimensional hash? <jurgenex@hotmail.com>
        Tar'ing files and changing directory in the tar file us (Fernando Luna)
        write to file <mail@eircom.net>
    Re: write to file <nobull@mail.com>
    Re: write to file <mail@eircom.net>
    Re: write to file <dave@dave.org.uk>
    Re: write to file <tassilo.parseval@post.rwth-aachen.de>
    Re: write to file <jurgenex@hotmail.com>
    Re: write to file <mail@eircom.net>
    Re: write to file <steven.smolinski@sympatico.ca>
    Re: write to file <nobull@mail.com>
    Re: write to file <mail@eircom.net>
    Re: write to file <jhalpin@nortelnetworks.com_.nospam>
    Re: write to file <wksmith@optonline.net>
    Re: write to file <nobody@noplace.com>
    Re: write to file <jurgenex@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 14 Nov 2002 13:01:59 -0800
From: "Brian Helterline" <brian_helterline@hp.com>
Subject: OT Re: help with Win32::OLE MS Word
Message-Id: <ar133h$4kh$1@hpcvsgen.cv.hp.com>

[top post rearranged - don't top post]

"ted" <tednospam94107@yahoo.com> wrote in message
news:aqsg4a$gmd$1@slb4.atl.mindspring.net...
>
>
> "Brian Helterline" <brian_helterline@hp.com> wrote in message
> news:aqs46t$63f$1@hpcvsgen.cv.hp.com...
> > "ted" <tednospam94107@yahoo.com> wrote in message
> > news:<aqqdmq$k4c$1@slb2.atl.mindspring.net>...
> > > Hello,
> > >
> > > I'm trying to extract text from MS Word docs that have tables and
> bulleted
> > > lists.
> > >
> > > How would I detect tables and bulleted lists (and nested lists) in the
> > Word
> > > doc? They are scattered throughout the doc.
> > >
> > > Any help appreciated. Thanks.
> > > -Ted
> > >
> > Hi Ted,
> > There is a Tables collection for the document that contains all the
tables
> > within the document.
> > Word->Document->Tables
> > Bulleted lists are just a format style so you would have to search for a
> > style to locate them.
> > -brian
> >
> How would I figure out where the table is in relation to everything else
in
> the Document. For instance, how would I know if the table is after the
third
> paragragh or the fifth paragraph?


Word->Documents->Tables(1)->Range->Start gives the first character and
Word->Documents->Tables(1)->Range->End returns the last character

You can get the range object for paragraphs also and then compare Starting
and
Ending positions.

>
> Also, how would I figure out if a bulleted list has a nested list?
>
There is a Lists collection, just like Tables and you can check the
ListLevelNumber
or something similar to that.





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

Date: 14 Nov 2002 11:29:57 -0800
From: rook_5150@yahoo.com (Bryan Castillo)
Subject: Re: Possible solution for too long list problem requested.
Message-Id: <1bff1830.0211141129.49465826@posting.google.com>

jan_may2002_fure@attbi.com (Jan Fure) wrote in message news:<e47a84bf.0211131817.4e8b0bef@posting.google.com>...
> I recently wrote a script which requires user input to pick a
> directory in which to process files. The way to pick one or more
> directories is by inputing a matching string through standard input.
> 
> The problem with my script is that if @dirs contains more elements
> than can be displayed on the output terminal (~25-50), the user will
> be required to scroll back (may or may not work depending on terminal
> definition) or know in advance which directory to choose based on
> looking at the directory list.
> 
> The ideal solution would be some output similar to lynx (the original
> web browser) where the user can browse through the @dirs elements and
> pick one or more elements. Another solution would be using the
> WIN32::GUI module, and create a dialog where the user picks one or
> more elements.
> 
>

The easiest thing to do is to pipe your output through less or more

sub select_elem {
  my $array = shift;
  my $prompt = "Type Q to quite selection view use arrow keys to
scroll";
  while (1) {
    #my $pipe = IO::File->new("| less '-P$prompt'") || die;
    my $pipe = IO::File->new("| more") || die;
    { local($SIG{PIPE}) = 'IGNORE';
      foreach my $i (0..$#{$array}) {
        printf $pipe " %3d : %s\n", ($i+1), $array->[$i];
      }
      $pipe->close;
    }
    print "Selection is: ";
    my $v = <STDIN>;
    chomp($v);
    return undef if ($v =~ /^(q|quit|bye|exit)$/i);
    return $array->[$v] if ($v =~ /^\d+$/ and $v < $#{$array});
  }
}

If you want something more sophisticated, you might look at Curses for
console/screen handling on unix, Term::ReadKey will also help you with
consoles on windows and unix, for guis you might want consider Tk (on
unix and windows).


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

Date: Thu, 14 Nov 2002 12:17:37 -0800
From: "Jay Calvert" <jcalvert@no.spam.canspec.com>
Subject: Redhat 8.0 and Perl
Message-Id: <wxTA9.192828$C8.489070@nnrp1.uunet.ca>

I know this generally not the place for this type of question but I was
wondering if anybody else has had this problem.

I have Redhat 8.0 and perl was included (5.8.0)

I do not have much experience with perl but it seems that the following
should work

test.pl
--------
!# /usr/bin/perl
print "Hello, World";
--------

I run this file from the command line
perl test.pl

but nothing happens
I even tried perl -c test.pl
and everything came back fine as far as syntax

Any help would be appreciated.

Jay





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

Date: Thu, 14 Nov 2002 12:30:51 -0800
From: "Tan D Nguyen" <nospam@nospam.com>
Subject: Re: Redhat 8.0 and Perl
Message-Id: <ar1140$ehnbi$1@ID-161864.news.dfncis.de>


"Jay Calvert" <jcalvert@no.spam.canspec.com> wrote in message
news:wxTA9.192828$C8.489070@nnrp1.uunet.ca...
> I run this file from the command line
> perl test.pl
>
> but nothing happens
> I even tried perl -c test.pl
> and everything came back fine as far as syntax
Try $perl -we 'print "Hello\n"'




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

Date: 14 Nov 2002 15:35:39 -0500
From: BreadWithSpam@fractious.net
Subject: Re: Redhat 8.0 and Perl
Message-Id: <yob7kffsxd0.fsf@panix2.panix.com>

"Jay Calvert" <jcalvert@no.spam.canspec.com> writes:

> !# /usr/bin/perl

You probably meant

#!/usr/bin/perl

> print "Hello, World";

> I run this file from the command line
> perl test.pl
> 
> but nothing happens

Actually, something did happen, only it happened
so fast that you never saw it.

You didn't put a newline character at the end
of your string, so it printed the Hello, World
and _very_ quickly, overwrote it with your prompt.

Try:

print "Hello, World\n";



-- 
Plain Bread alone for e-mail, thanks.  The rest gets trashed.
No MIME in E-Mail! --    http://www.expita.com/nomime.html
Are you posting responses that are easy for others to follow?
   http://www.greenend.org.uk/rjk/2000/06/14/quoting


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

Date: Thu, 14 Nov 2002 14:57:57 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Redhat 8.0 and Perl
Message-Id: <slrnat83il.3la.tadmc@magna.augustmail.com>

Jay Calvert <jcalvert@no.spam.canspec.com> wrote:

> !# /usr/bin/perl
  ^^
  ^^

You have transposed those 2 characters.


> print "Hello, World";

> I run this file from the command line
> perl test.pl
> 
> but nothing happens


That's strange. 

It runs fine for me on RH 7.2.


> I even tried perl -c test.pl


Might as well see if perl itself can help you find suspicious code:

   perl -cw test.pl


> and everything came back fine as far as syntax


The syntax _is_ fine, it is a valid Perl program, same as:

   ! print "Hello, World";

You would get a warning about that if you had asked for warnings.


> Any help would be appreciated.


I cannot duplicate the problem you are seeing. Sorry.


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


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

Date: Thu, 14 Nov 2002 21:17:28 GMT
From: tk <tk@WINDOZEdigiserv.net>
Subject: Re: Redhat 8.0 and Perl
Message-Id: <go48tu87hksfnpvtp0630qk2fv48raem9q@4ax.com>

In a fit of excitement on Thu, 14 Nov 2002 12:17:37 -0800, "Jay Calvert"
<jcalvert@no.spam.canspec.com> managed to scribble:

| I know this generally not the place for this type of question but I was
| wondering if anybody else has had this problem.
| 
| I have Redhat 8.0 and perl was included (5.8.0)
| 
| I do not have much experience with perl but it seems that the following
| should work
| 
| test.pl
| --------
| !# /usr/bin/perl
| print "Hello, World";
| --------
| 
| I run this file from the command line
| perl test.pl
| 
| but nothing happens
| I even tried perl -c test.pl
| and everything came back fine as far as syntax
| 
| Any help would be appreciated.
| 
| Jay
| 
| 
The shebang line should read:

  #!/path/to/perl


Regards,

  tk

-- 
 +--------------------------+
 |     digiServ Network     |
 |      Web solutions       |    Remove WINDOZE to reply.
 | http://www.digiserv.net/ |
 +--------------------------+


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

Date: Thu, 14 Nov 2002 21:25:03 GMT
From: Asad <g0khaasa@cdf.toronto.edu>
Subject: Sending veriables to pl script using hyperlinks
Message-Id: <Pine.LNX.4.30.0211141624520.23921-100000@b375-15.cdf>

Hi,

I have the following line in my html file:

  <a href="cgi-bin/fetchPosters.pl?var1='music'"
                       target="content">Music</a><br/>

and the following in my fetchPosters.pl script

  my $userinput = = $cgi->param('var1');

However, it doesn't work. I think I am goofing up some dumb syntax,
thought I can't find an example on the web. They all use the flippin forms
and inputs. I wanna know how I can pass variable this way (or some other)
using hyperlinks (NO FORMS!).





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

Date: Fri, 15 Nov 2002 00:03:30 +0200
From: "Oskari Tanner" <oskari.tanner@nospam-zerodistance.org>
Subject: Re: Sending veriables to pl script using hyperlinks
Message-Id: <ar16ji$aci$1@phys-news1.kolumbus.fi>

Asad wrote:
> Hi,
Hello,

> and the following in my fetchPosters.pl script
>
>   my $userinput = = $cgi->param('var1');
You should use:
my $userinput = $cgi->param('var1') || "";
# If parameter 'var1' does not exist the value is set to "".

And '==' is used for comparing.

--
print"# $_ \n"for split/\n/,qq~
Oskari Tanner
zerodistance.org
oskari.tanner\@zerodistance.org
~;




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

Date: Thu, 14 Nov 2002 22:43:53 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: some help with a print statement requested - double quotes giving me trouble!
Message-Id: <mbudash-7981C0.14435214112002@typhoon.sonic.net>

In article <3DD251E6.683BA627@aracnet.com>,
 Abernathey Family <family2@aracnet.com> wrote:

> Philip Lees wrote:
> > 
> > On Tue, 12 Nov 2002 11:59:32 -0800, Paul Spitalny
> > <no_spam@no_spam.com> wrote:
> > 
> > >Hi,
> > >I am trying to print a line and I want quotation marks in the output
> > >line. The exact output line I want to print, to the output file, is:
> > >
> > >       .options probefilename="output.dat"
> > >
> > >I tried to print the line using the following perl code:
> > >
> > >       print TEMP ".options probefilename="output.dat"\n";
> > >
> > >But,this does not work.
> > >
> --snip--
> 
> I believe you can escape the double-quotes you want printed, like:
> 
> print TEMP ".options probefilename=\"output.dat\"\n";

or, use single quotes:

print TEMP '.options probefilename="output.dat"' . "\n";

or, use alternate interpolative quotes:

print TEMP qq(.options probefilename="output.dat"\n);

or, or, or...

hth-


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

Date: Thu, 14 Nov 2002 19:25:09 GMT
From: T Stephens <user@server.com>
Subject: Re: Sort multidimensional hash?
Message-Id: <Xns92C67429382BFtimstephens@24.69.255.211>

Mike,

Thanks. You're right. I was thinking about multi-dimensional hashes 
incorrectly. My head still hurts...but it's beginning to sink in.

Is there an online resource that explains the concepts of when it's best 
to use hashes and when it's best to use arrays?

Tim


Mike Mayer <vm.mayer@comcast.net> wrote in
news:vm.mayer-83542F.19123709112002@news-east.giganews.com: 

> In article <Xns92C055922F91Dtimstephens@24.69.255.211>,
>  T Stephens <user@server.com> wrote:
> 
>> I need to sort a multidimensional hash by values, but I can't seem to
>> wrap my head around this. I have sorted hashes by value before, but 
>> haven't needed to work with multidimensional ones before.
>> 
>> For example, if I have the following data:
>> 
>> Name         Games         Goals         Assists    Points
>> Mario         12         8                  21         29
>> Martin         13         9                  11         20
>> Alex         13         8                  11         19
>> Mike         14         8                  10         18
>> 
>> I was planning on setting up the hash structure like so (although it 
>> would be loading in from a datafile, and would be looped over):
>> 
>> $hash{1}{name} = "Mario";
>> $hash{1}{games} = 12;
>> $hash{1}{goals} = 8;
>> $hash{1}{assists} = 21;
>> $hash{1}{points} = 29;
>> $hash{2}{name} = "Martin";
>> $hash{2}{games} = 13;
>> $hash{2}{goals} = 9;
>> $hash{2}{assists} = 11;
>> $hash{2}{points} = 20;
>> 
>> (and so on)
>> 
>> Then I need to be able to generate outputs where the data is sorted 
>> alphabetically based on almost any criteria and keep the other stats
>> with the corresponding player. Obviously, there would be no point in
>> showing Mario's name with Mike's games, Martin's assists, and Alex's
>> points. 
>> 
>> I also need to be able to sort the data based on games, goals,
>> assists, and points.
>> 
>> I've scoured over my Perl books and they do cover sorting hashes on 
>> values and multidimensional arrays, but never at the same time.
>> 
>> Any assistance would be greatly appreciated. Perhaps I'm going about
>> this all wrong...if so let me know that too.
>> 
>> Tim
>> 
> 
> Unless the (1,2,3,...) are an intrinsically important number (like a 
>   player ID), you have missed the point of hashes...  You are trying
>   to create an array using the hash syntax....
> 
> You should have something more like:
>   $hash{mario}->{games} = 12;
>   $hash{mario}->{goals} = 8;
>   $hash{mario}->{assists} = 21;
>   $hash{mario}->{points} = 29;
>   $hash{Martin}->{games} = 13;
>   $hash{Martin}->{goals} = 9;
>   $hash{Martin}->{assists} = 11;
>   $hash{Martin}->{points} = 20;
> 
> Or more perlesque:
>   $hash{mario} = {games=>12, goals=>8, assists=>21, points=>29};
>   $hash{Martin} = {games=>13, goals=>9, assists=>11, points=>20};
> 
> Note also that a multidimensional hash doesn't exist as such per se.
>   The values of a hash must be a scalar.... but a hash reference is a 
>   scalar... thus above, each element of %hash contains an anonymous
>   hash reference.
> 
> See perldoc perldata and perldoc perlref
> 
> On to your actual question... I'll provide an example.
> 
> my %hash = ( mario => {games=>12, goals=>8, assists=>21, points=>29},
>               Martin => {games=>13, goals=>9, assists=>11, points=>20}
>               ); 
> 
> my @keys = sort { $hash{$a}->{games} <=> $hash{$b}->{games} } keys
> %hash; 
> 
> foreach my $key (@keys) {
>   # 
>   # Do here whatever you want to do with your sorted hash of hashes
>   #
> }
> 
> hth
> mike
> 



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

Date: Thu, 14 Nov 2002 19:53:35 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Sort multidimensional hash?
Message-Id: <3bTA9.19171$4N1.13835@nwrddc04.gnilink.net>

T Stephens wrote:
> Is there an online resource that explains the concepts of when it's
> best to use hashes and when it's best to use arrays?

Actually, it's quite simple:
When the abstract data structure is a list (i.e. it has an order), then
arrays are the right choice.
If the abstract data structure is a mapping and the domain are numbers and
are more or less continuous, then arrays are the right thing.

If the abstract data structure is a set (i.e. it has no order and elements
cannot appear twice) then the keys of a hash are the right choice (you can
ignore the values).
If the abstract data structure is a mapping and the domain are arbitrary
scalars (opposite to continious numbers) then a hash is the right choise.

So first of all think about what features you need for your data structure
and then choose the proper data type. Features to consider are
- is the order of the elements significant?
- can values appear more than once?
- what is the domain of my mapping, numbers or arbitrary scalars?
Based on the answers pick your choice.

jue




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

Date: 14 Nov 2002 13:13:10 -0800
From: fluna@tideworks.com (Fernando Luna)
Subject: Tar'ing files and changing directory in the tar file using Archive::Tar
Message-Id: <34d8fec1.0211141313.21d90644@posting.google.com>

On my staging machine I have files sitting in a directory appropriate
to the type of file it is for production sites.

(ie. Oracle forms under a /forms directory, scripts under a /scripts
directory, reports under a /reports directory)

In essence we have a structure like:
/u01/app/application/forms/XXX001F.fmx
/u01/app/application/reports/XXX001R.rep
/u01/app/application/scripts/XXX001.sh

Additionally, before we go to production we place files in a release
directory.

/u01/app/release/1.0.0/
/u01/app/release/1.0.1/
etc...

Once a release is ready to go, the files are placed there:
/u01/app/release/1.0.0/XXX001F.fmx
/u01/app/release/1.0.0/XXX001R.rep
/u01/app/release/1.0.0/XXX001.sh

then tar'ed and compressed into one file from the release directory...

I want to create a tar file off of the files placed in the
/u01/app/release tree but I would like to specify a relative path that
would be present in the tar file, irrespective of it having been found
all in the same "release directory".

In other words, I want to create a tar file from the files found in
the release directory but for the tar file to understand that
XXX001F.fmx belongs in "/u01/app/application/forms" on the production
machine.

It's a simple matter to determine where the file belongs. My problem
is trying to create a tar file from the "release" directory and
somehow indicate to "tar" that file X is going into Y directory in
production.

I couldn't find an obvious way to do this using the tar command, so I
was hoping that perhaps Archive::Tar could accomplish this. I've
installed Archive::Tar, and read the perldoc but it doesn't seem to be
able to accomodate what I'm hoping to achieve.

Can someone offer an example of how this might be accomplished using
perl?

Thanks

Fernando Luna


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

Date: Thu, 14 Nov 2002 19:03:40 -0800
From: "Linux.ie" <mail@eircom.net>
Subject: write to file
Message-Id: <ar0oap$cq5$1@dorito.esatclear.ie>

i have a ping script (which i cannot post) and i want it to write to a .txt
file. what command should i use ??




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

Date: 14 Nov 2002 19:32:44 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: write to file
Message-Id: <u9bs4sx7z7.fsf@wcl-l.bham.ac.uk>

"Linux.ie" <mail@eircom.net> writes:

> i have a ping script (which i cannot post) and i want it to write to a .txt
> file. what command should i use ??

print

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Thu, 14 Nov 2002 19:41:08 -0800
From: "Linux.ie" <mail@eircom.net>
Subject: Re: write to file
Message-Id: <ar0qh3$dnc$1@dorito.esatclear.ie>

dont understand,i want to write to reply.txt file




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

Date: Thu, 14 Nov 2002 19:54:01 +0000
From: "Dave Cross" <dave@dave.org.uk>
Subject: Re: write to file
Message-Id: <pan.2002.11.14.19.54.01.110090@dave.org.uk>

On Thu, 14 Nov 2002 19:41:08 +0000, Linux.ie wrote:

> dont understand,i want to write to reply.txt file

open REPLY, '>reply.txt' or die $!;
flock REPLY, LOCK_EX or die $!
print REPLY, $some_data;
close REPLY;

-- 
  It was long ago and it was far away
  And it was so much better that it is today



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

Date: 14 Nov 2002 19:57:26 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: write to file
Message-Id: <ar0v76$rk1$1@nets3.rz.RWTH-Aachen.DE>

This is not your first posting to clpm. I wonder that you still haven't
figured out how to do proper postings. Supply context, that is, quote
the parts you are responding to. Do that in an accepted manner: First
the quote immediately followed by your comments. Otherwise you will end
up in quite a few killfiles which would render this group pretty useless
to you.

Also sprach Linux.ie:

> dont understand,i want to write to reply.txt file

Then you open the file before using print():

    open FILE, ">reply.txt" or die "Error: $!";
    print FILE "This goes to the file\n";
    close FILE;
    
This is all documented: 'perldoc -f open' and 'perldoc perlopentut'.

Don't expect this group to be your interactive manpage. If you do so
same consequences will apply as described above.

Tassilo
-- 
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;


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

Date: Thu, 14 Nov 2002 19:58:05 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: write to file
Message-Id: <hfTA9.19201$4N1.3641@nwrddc04.gnilink.net>

Linux.ie wrote:
> dont understand,i want to write to reply.txt file

What do you don't understand? Without providing context your posting doesn't
make any sense.

Do write/print something use the 'print' command. Further details see
'perldoc -f print'.
Do print to a file open that file first ('perldoc -f open'), then print to
the filehandle ('perldoc -f print').

jue





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

Date: Thu, 14 Nov 2002 19:56:33 -0800
From: "Linux.ie" <mail@eircom.net>
Subject: Re: write to file
Message-Id: <ar0rds$dv7$1@dorito.esatclear.ie>

do i have to write something before that because iam getting a error back
saying "no comma allowed"






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

Date: Thu, 14 Nov 2002 19:52:51 GMT
From: Steven Smolinski <steven.smolinski@sympatico.ca>
Subject: Re: write to file
Message-Id: <naTA9.13656$md7.1194301@news20.bellglobal.com>

Linux.ie <mail@eircom.net> wrote:
> i want to write to reply.txt file

open  it:      perldoc -f open 
print it:      perldoc -f print
close it:      perldoc -f close

HTH.

Steve


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

Date: 14 Nov 2002 20:04:47 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: write to file
Message-Id: <u93cq3yl28.fsf@wcl-l.bham.ac.uk>

"Linux.ie" <mail@eircom.net> writes:

> do i have to write something before that because iam getting a error back
> saying "no comma allowed"

Yes there was a typo in the advice given to you (which you failed to
quote).  Guessing what the typo was from the error message "no comma
allowed" (which presumably gave you the line number too) is left as an
IQ test for the reader.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Thu, 14 Nov 2002 20:11:58 -0800
From: "Linux.ie" <mail@eircom.net>
Subject: Re: write to file
Message-Id: <ar0sap$edn$1@dorito.esatclear.ie>

okay thanks all. i got it. By the way Tassilo v. Parseval iam 14 years old,
dont know much about perl and wanting to learn it so i need to talk to
people who allready no it.Iam very sorry if i ve done something wrong on the
is newgroup but i didnt mean it




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

Date: 14 Nov 2002 14:17:34 -0600
From: Joe Halpin <jhalpin@nortelnetworks.com_.nospam>
Subject: Re: write to file
Message-Id: <yxs74rajnbxd.fsf@nortelnetworks.com_.nospam>

"Linux.ie" <mail@eircom.net> writes:

> dont understand,i want to write to reply.txt file

Read the man page for whatever shell you're using. If it doesn't have
print, it should have echo. Either one can write to a file on
disk. Unless you're using some csh variant, I'm not sure they can do
this kind of file redirection.

Joe


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

Date: Thu, 14 Nov 2002 20:22:58 GMT
From: "Bill Smith" <wksmith@optonline.net>
Subject: Re: write to file
Message-Id: <CCTA9.36610$Vy4.819@news4.srv.hcvlny.cv.net>


"Linux.ie" <mail@eircom.net> wrote in message
news:ar0oap$cq5$1@dorito.esatclear.ie...
> i have a ping script (which i cannot post) and i want it to write to a
 .txt
> file. what command should i use ??
>
>

You need open, print, and close.  refer
perldoc -f open
perldoc -f print
perldoc -f close
perldoc perlopentut

Bill




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

Date: Thu, 14 Nov 2002 21:36:31 GMT
From: "Gregory Toomey" <nobody@noplace.com>
Subject: Re: write to file
Message-Id: <01c28c27$5f395040$b1498a90@gmtoomey>

Linux.ie <mail@eircom.net> wrote in article
<ar0sap$edn$1@dorito.esatclear.ie>...
> okay thanks all. i got it. By the way Tassilo v. Parseval iam 14 years
old,
> dont know much about perl and wanting to learn it so i need to talk to
> people who allready no it.Iam very sorry if i ve done something wrong on
the
> is newgroup but i didnt mean it

Congratulations! Next year you will probably be running a web hosting
service like plenty of ther 15yo's.

gtoomey


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

Date: Thu, 14 Nov 2002 21:58:00 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: write to file
Message-Id: <I%UA9.24467$TL6.23594@nwrddc02.gnilink.net>

Linux.ie wrote:
> do i have to write something before that because iam getting a error
> back saying "no comma allowed"

What is "that"?
No, you don't have to *write* anything before "that".
It would be sufficient if you *don't delete* that part of the original text
that you are refering to.

jue




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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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


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