[15496] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2906 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 29 21:05:38 2000

Date: Sat, 29 Apr 2000 18:05:10 -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: <957056709-v9-i2906@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 29 Apr 2000     Volume: 9 Number: 2906

Today's topics:
        Can I open an http stream using perl as CGI ? <ragnad@erols.com>
    Re: Can I open an http stream using perl as CGI ? <jeff@vpservices.com>
        Capturing keypress. <josh@projectperl.com>
    Re: Capturing keypress. <makarand_kulkarni@My-Deja.com>
    Re: help me <godzilla@stomp.stomp.tokyo>
    Re: help me (brian d foy)
    Re: Help with @inc error please.... <makarand_kulkarni@My-Deja.com>
        How many times is it found? <ppi@searchy.net>
    Re: How many times is it found? <lr@hpl.hp.com>
        how to get a reference to an object's method and use it <schan_ca@geocities.com>
    Re: how to get a reference to an object's method and us <rootbeer@redcat.com>
        Im ohhh so close.  just a tad bit more help needed. <care227@attglobal.net>
    Re: Im ohhh so close.  just a tad bit more help needed. <phill@modulus.com.au>
        Need Help! <michael@tucagua.com>
    Re: Need Help! <rootbeer@redcat.com>
        Newline representations and idiotic subject lines, was  <flavell@mail.cern.ch>
        Order of evaluation (Was: Re: regex) <lr@hpl.hp.com>
    Re: overloading & 'constant' subroutines (Ilya Zakharevich)
    Re: Perl modules for AFS <makarand_kulkarni@My-Deja.com>
    Re: program that prints itself (Mark-Jason Dominus)
    Re: reading .ost files amarodeeps@my-deja.com
        regexp for time stamps helix_r@my-deja.com
    Re: regexp for time stamps <tony_curtis32@yahoo.com>
    Re: Something isn't working, and I can't figure it out <care227@attglobal.net>
    Re: Something isn't working, and I can't figure it out <lr@hpl.hp.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sat, 29 Apr 2000 17:04:21 -0400
From: "George & Michelle Wilkinson" <ragnad@erols.com>
Subject: Can I open an http stream using perl as CGI ?
Message-Id: <8efin1$1pi$1@bob.news.rcn.net>

Hi,

I'm looking to open a web page as a file so I can
parse and extract selected data.

I (naively) tried

open (HFILE, "<" . "http:/www.somedomain.com/hfile.html") ||
   die "No dice !\n";

But this didn't work.

I searched for a simple solution with no luck.

Is it possible to do this ?

Thanks,
George




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

Date: Sat, 29 Apr 2000 14:12:39 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Can I open an http stream using perl as CGI ?
Message-Id: <390B5047.614B00A6@vpservices.com>

George & Michelle Wilkinson wrote:
> 
> Hi,
> 
> I'm looking to open a web page as a file so I can
> parse and extract selected data.

What you need is the LWP (libwww) modules.  It can fetch files via http
and you can then modify or display them.

-- 
Jeff


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

Date: Sat, 29 Apr 2000 17:58:22 -0500
From: "Josh" <josh@projectperl.com>
Subject: Capturing keypress.
Message-Id: <sgmqbb2gi5078@corp.supernews.com>

I was wondering how I would go about detecting keypresses while the program
is running? Say I want the program to shutdown whenever someone did a ^D.
Thank you.

-Josh




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

Date: Sat, 29 Apr 2000 16:29:15 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Capturing keypress.
Message-Id: <390B704B.5261B0FC@My-Deja.com>

>  Say I want the program to shutdown whenever someone did a ^D.

Check perl faq part 8




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

Date: Sat, 29 Apr 2000 12:51:33 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: help me
Message-Id: <390B3D45.659D9208@stomp.stomp.tokyo>

Garret Harris wrote:

> I'm doing a database and I need some help with a
> few problems 1 Does anyone know how to change an
> enter on a multi line text box into something 
> else i.e. <BR>  because I have to store a comment
> on a file but an enter starts a new line.

A given for you Garret, some tech info of 
benefit to know. Almost all browsers, IBM,
MAC or Lynx based browsers, will create,

\r\n

within a form action multi-line text box
when 'Enter' is pressed. My use of 'within'
means when a user's cursor is within this
form action text box and, Enter is pressed.

\r is an old fashion 'carriage return' symbol
   if I may use a typewriter as an analogy.

\n is a high tech symbol for 'new line'
   for today's electronic systems.

You have some nice options on what you can
to do with this. Clearly your concern is
focused on a new line character \n for
your plain text file, if I understand
your question. This will be addressed
along with other options.


To remove your \r and \n then insert <BR>
in their place:

$your_input =~ s/\r\n/<BR>/g;

Use of 'g' for global will catch these 
characters anywhere and everywhere, if
this is a concern you have for whatever
technical reason. You should see <BR> 
at the end of each line. Your plain 
text file would appear:

a line<BR>next line<BR>another line<BR>


An alternative choice is,

$your_input =~ s/\r/<BR>/g;

This removes the \r character only
and leaves your \n character, along
with substituting in <BR>. Your final
outcome would look like this:

a line<BR>\n
next line<BR>\n
another line<BR>\n


Clearly there is a problem with removing
both \r and \n for a plain text document.
This problem is in readability for our
human eyes.


You might consider a different variation
on this to make your plain text file a
bit easier to read,

$your_input =~ s/\r\n/ <BR> /g;

Your file would now appear as:

a line <BR> next line <BR> another line <BR>

This is a little easier on the peepers.


Should you decide to simply remove everything,
plan ahead. You may want to make an array at
sometime and need a delimiter. Careful planning
is required to insert a good clean delimiter.
Use of a space for a delimiter is usually not
a good idea as you will surmise.


You may simply substitute in a space,

$your_input =~ s/\r\n/ /g; 

Substituting in a space results in:

a line  next line  another line 

However, you can see there is a serious
problem with a split based on a space.


In contrast, substituting in 'nothing',

$your_input =~ s/\r\n//g; 

Gives you a real mess:

a linenext lineanother line 


Another example if you want a clear
easy to see delimiter for your file,

$your_input =~ s/\r\n/¦/g; 

Using ¦ gives you an easy to read file:

a line¦next line¦another line¦

This also sets you up for a very easy
to manage split later if you need to
create an array.


Finally, if you want this <BR> in there,
with spaces on either side for ease in
reading and, want a clean delimiter 
for a split,

$your_input =~ s/\r\n/ <BR> ¦/g; 

Now you are set for just about anything
you want to do. You may remove ¦ for an
HTML print, or split on ¦ for an array:

a line <BR> ¦next line <BR> ¦another line <BR> ¦



Godzilla! \r\n


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

Date: Sat, 29 Apr 2000 16:41:54 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: help me
Message-Id: <brian-ya02408000R2904001641540001@news.panix.com>

In article <390B3D45.659D9208@stomp.stomp.tokyo>, "Godzilla!" <godzilla@stomp.stomp.tokyo> posted:

> \r is an old fashion 'carriage return' symbol
>    if I may use a typewriter as an analogy.

> \n is a high tech symbol for 'new line'
>    for today's electronic systems.

these definitions depend on your particular operating system.
they do not necessarily represent a particular bit pattern.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>


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

Date: Sat, 29 Apr 2000 16:26:55 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Help with @inc error please....
Message-Id: <390B6FBF.77ADBB9A@My-Deja.com>

> I know the module is in there at :
> /usr/local/lib/site_perl/LWP/Simple.pm
>
> but keep getting this error:
> Can't locate LWP/Simple.pm in @INC (@INC contains:
> /usr/libdata/perl/5.00503/mac
> h /usr/libdata/perl/5.00503
> /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /u
> sr/local/lib/perl5/site_perl/5.005 .) at parseentry.cgi line 3.
>
> Could someone help or propose a solution?

Your @INC does not contain /usr/local/lib/site_perl/
Try
(1) Adding /usr/local/lib/site_perl/ to your  @INC list
(2) If (1) does not help install libwww module pack again.
--




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

Date: Sun, 30 Apr 2000 01:52:56 +0200
From: Penpal International <ppi@searchy.net>
Subject: How many times is it found?
Message-Id: <390B75D8.D64A0DDA@searchy.net>

How can check how many times something is found in a string. A long time
ago I had a script for this, but I've lost it. Example:

$string = "This a string with the word string. So this is just a
string";
# Here must come an unknown code...

It must result in 3 for 'string'. 2 for 'this' and all others 1 if it's
right...

Thanks,

Frank de Bot



-- 
Penpal International
http://ppi.searchy.net/
ppi@searchy.net


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

Date: Sat, 29 Apr 2000 17:32:13 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: How many times is it found?
Message-Id: <MPG.13751edc1136a05598a9ba@nntp.hpl.hp.com>

In article <390B75D8.D64A0DDA@searchy.net> on Sun, 30 Apr 2000 01:52:56 
+0200, Penpal International <ppi@searchy.net> says...
> How can check how many times something is found in a string. A long time
> ago I had a script for this, but I've lost it. Example:
> 
> $string = "This a string with the word string. So this is just a
> string";
> # Here must come an unknown code...
> 
> It must result in 3 for 'string'. 2 for 'this' and all others 1 if it's
> right...

Are you answering Perl questions for others?  If so, you might choose to 
get better acquainted with the voluminous FAQ.

perlfaq4: "How can I count the number of occurrences of a substring 
within a string?"

You will have to adapt the regex given in the FAQ to one similar to the 
one I responded with in your previous post, 'Where is it found?'

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Sat, 29 Apr 2000 18:20:22 GMT
From: steve <schan_ca@geocities.com>
Subject: how to get a reference to an object's method and use it?
Message-Id: <390B2933.41FD5F92@geocities.com>

Hello:

How do I get a reference to an object's method?

eg: in the CGI.pm module, the CGI object has
      a method named "param". It returns all the
      CGI parameters/values like so:

           @values = $query->param('foo');

How do I get a reference to   $query->param()   ?
maybe something like:

             $p = \$query->param()                ???

and then cast    " $p "      as      " &$p "      ???


This is as far as I can take it. Anyone else have
an idea?


Thanks
Steve






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

Date: Sat, 29 Apr 2000 13:19:28 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: how to get a reference to an object's method and use it?
Message-Id: <Pine.GSO.4.10.10004291311170.1278-100000@user2.teleport.com>

On Sat, 29 Apr 2000, steve wrote:

> How do I get a reference to an object's method?
> 
> eg: in the CGI.pm module, the CGI object has
>       a method named "param". It returns all the
>       CGI parameters/values like so:
> 
>            @values = $query->param('foo');

Nobody really recommends using the OOP interface to the CGI module - not
even Lincoln Stein himself! (He just fell under the influence of the OO
cult for a short time, but we got him deprogrammed. :-)  Instead, use the
function-oriented interface:

    use CGI qw/ :standard /;

    my @values = param('foo');

> How do I get a reference to   $query->param()   ?

At this point, if you really need a reference to the subroutine (is _that_
what you want?) you can get it as you would with any named sub:

    my $ref = \&param;

But I doubt that you want that; it's nearly useless. Could you want a
reference to an anonymous array of the foo parameters?

    my $ref = [ param('foo') ];

In case you need to know, in general, how to get at the subroutine which
implements a method, you can find that via the universal CAN method,
documented in the perlobj manpage. But actually using that reference is
one of the mortal sins of OOP. :-)

If I've guessed wrong about what you want, try again. Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sat, 29 Apr 2000 17:18:02 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Im ohhh so close.  just a tad bit more help needed.
Message-Id: <390B518A.41C3E981@attglobal.net>

I think Ive figured out the thrust of the problem Ive been having with 
my script. Ive narrowed down the problem, and I know whats causing it. 
Im just not sure WHY its happening.  Here's the relative portion of
code:

if (-e $filename){  #file exists, we go through here
		
		open (DATA, "< $filename") or 
		die "can't open $filename: $!"; #this works
		
			while (<DATA>){ #here's the problem, I think.
				
				chomp(@page_array = $_);
			}
			
		close DATA;

		$val_page = $page_array[0];
		print $val_page;  

#the above line prints "4:spec_num 5:spec_proc 1:price_plan"
#which is the entire array I passed to it. Ive tried using
#pop and shift as well, but they always print out the whole
#array instead of just the first value.  Why???
		
	if ($val_page){  #this test fails for some reason???

		open (DATA, "> $filename") or 
		die "can't open $filename: $!"; 
			
		print DATA map $_ . "\n" => @page_array;

		close DATA;	
					
	}else{
		#unlink $filename;
		&naughty; #changed this to stop the file removal.
			  #naughty is now displayed.  
				
	}	 			

So my main questions... 

1. Why does this code:

	while (<DATA>){ #here's the problem, I think.
				
				chomp(@page_array = $_);
			}

  print the array all with only 1 index?  I also tried

	chomp (@page_array = <data>); 

  with no while() loop, and the results were the same.  The file
  created is in this format: (I add a newline when I create the file)

	$ cat spanky.data
		4:spec_num
		5:spec_proc
		1:price_plan
		3:css_queue

2. EVEN if $valpage is getting way more than i expect, why does:

	if ($val_page)
   
   fail?  $valpage IS defined, just not correctly.  

Im very confused, as usual.  Any help is greatly appreciated.
(Sorry for another long post)

-Drew


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

Date: Sun, 30 Apr 2000 08:29:06 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: Im ohhh so close.  just a tad bit more help needed.
Message-Id: <390B6232.3BD9@modulus.com.au>

Drew Simonis wrote:
[snip]
> if (-e $filename){  #file exists, we go through here
> 
>                 open (DATA, "< $filename") or
>                 die "can't open $filename: $!"; #this works
> 
>                         while (<DATA>){ #here's the problem, I think.
> 
>                                 chomp(@page_array = $_);
					^^            ^^
				#assigning a scalar to an array should ring warning bells

				chomp; #acts on $_ by default
				push(@page_array,$_); #extend array and place $_ in last position


> (Sorry for another long post)
Shortened ... all your later consequences are, well, later
consequences...
HTH
-- 
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/


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

Date: Sat, 29 Apr 2000 18:44:18 GMT
From: Michael Roterman <michael@tucagua.com>
Subject: Need Help!
Message-Id: <B530FA04.15AA%michael@tucagua.com>

Hi, 
I need some help with reading a file and printing the contents.
I currently have the code below:

open (T,"$filetoopen");
     while () { 
     chomp; 
     (@threads) = split(/\|/,$_);
     
     $messagefile = $mainpath . "/forum" . $forum . "/" . $threads[0] .
".thd"; 
     
     open (M,"$messagefile");
     while () { 
     chomp; 
     (@message) = split(/\|/,$_);
     } 
     close M; 
     
     $posted = ("$threads[4]");
     
     $ordered = 
"$threads[0]|$threads[1]|$threads[2]|$threads[3]|$posted|$threads[5]|$thread
s[6]|$forum|$message[6]";
     push @allthreads, $ordered;
     } 
close T; 

My .thd file looks like this:

bla|bla|bla|bla|bla|bla|bla
bla|bla|bla|bla|bla|bla|bla

Now my problem is that I only want the first line of this file and the last
part of it, not the the other ones below it. As the code is now I am getting
the last line. 


Problem No2:

I also want $threads[0] to be subtracted by -1, so if it has a value of 1 I
want it to be 0. 

I would appreciate your help.

thanks



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

Date: Sat, 29 Apr 2000 13:23:16 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Need Help!
Message-Id: <Pine.GSO.4.10.10004291319450.1278-100000@user2.teleport.com>

On Sat, 29 Apr 2000, Michael Roterman wrote:

> Subject: Need Help!

Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.

    http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

> open (T,"$filetoopen");

Those quote marks are merely misleading. And that variable name would be a
lot easier to read if it were $file_to_open, say. Even when your script is
"just an example" (and perhaps especially in that case!) you should
_always_ check the return value after opening a file.

>      while () { 

You should know that that is one of many ways to intentionally start an
infinite loop in Perl. Did you mean to use something like this instead?

    while (<>) { ... }

> I also want $threads[0] to be subtracted by -1, so if it has a value
> of 1 I want it to be 0.

That's easy to do with an 'if' test, among many other ways. How far have
you gotten?

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sat, 29 Apr 2000 23:08:21 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Newline representations and idiotic subject lines, was Re: help me
Message-Id: <Pine.GHP.4.21.0004292257490.1593-100000@hpplus01.cern.ch>

On Sat, 29 Apr 2000, brian d foy quoted more time-wasting woffle from
the troll:

> > \r is an old fashion 'carriage return' symbol
> >    if I may use a typewriter as an analogy.
> 
> > \n is a high tech symbol for 'new line'
> >    for today's electronic systems.

And not unreasonably commented:

> these definitions depend on your particular operating system.

Indeed, and there's some helpful discussion of them in the perlport
document [1]

But this doesn't seem to be getting us any nearer to understanding
what question the original poster was trying to ask.  <BR> is an HTML
linebreak markup, it doesn't have any particular significance to Perl.

So I can only echo what a couple of other coherent contributors have
said - that the original poster needs to formulate their question in
some more comprehensible terms.


[1] I'm specifically referring to these bits, but readers should
consult the full 'perldoc perlport' for themselves:

  In most operating systems, lines in files are terminated by newlines.  Just
  what is used as a newline may vary from OS to OS.  Unix traditionally uses
  \012, one kind of Windows I/O uses \015\012, and Mac OS uses \015.

  Perl uses \n to represent the "logical" newline, where what is logical may
  depend on the platform in use.  In MacPerl, \n always means \015.  In
  DOSish perls, \n usually means \012, but when accessing a file in "text"
  mode, STDIO translates it to (or from) \015\012.

and

  A common misconception in socket programming is that \n eq \012 everywhere.
           ^^^^^^^^^^^^^
  When using protocols such as common Internet protocols, \012 and \015 are
  called for specifically, and the values of the logical \n and \r (carriage
  return) are not reliable.

ttfn

-- 

Partake of distilled wisdom of Usenet - read the FAQs.
Before you ask.




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

Date: Sat, 29 Apr 2000 09:10:46 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Order of evaluation (Was: Re: regex)
Message-Id: <MPG.1374a95e311095a998a9b5@nntp.hpl.hp.com>

[Cross-postted to comp.lang.perl.moderated, because of a fundamental 
semantic issue.]

In article <8ee13m$t59$1@nnrp1.deja.com> on Sat, 29 Apr 2000 06:56:57 
GMT, jlamport@calarts.edu <jlamport@calarts.edu> says...

 ...

> > $one =~ s/book/script.pl/e;
> 
> If $one contains the string 'book', then this will call the subroutine
> named script, then call the subroutine named pl, and replace the first
> occurance in $one of the string 'book' with the concatenated return
> values of the two subroutines.  If this is what you want, then yes, this
> works.
> 
> (hint:  this version could be more clearly written as:
> 
> $one =~ s/book/ script() . pl() /e;
> 
> )

I know that you are going through this analysis as a long-winded way of 
answering 'no' to the original poster's question of whether this 
statement would 'work'.  But it raises a question that is interesting to 
me, and perhaps illustrative of the vaguely documented semantics of 
Perl.  (Ilya Zakharevich is vigorously nodding 'yes'.)

You state categorically that script() will be evaluated before pl(), 
implying a guaranteed order for their side effects, if any.  But all 
perlop says about this is:

   Binary ``.'' concatenates two strings.

In C, the order of evaluation of the operands of a binary operator is 
explicitly unspecified for most operators.  Left-to-right evaluation is 
guaranteed for only a few binary operators, as in Perl:  && || and 
comma.

Perl should document either that the order of evaluation of the operands 
of a binary operator is in general unspecified, or it should document 
that it is left-to-right.  In the absence of either specification, 
assertions such as yours are suspect.

[Note:  Sometimes Perl does specify things that C does not.  For 
example, the order of evaluation of the arguments to a C subroutine is 
unspecified; the order of evaluation of the arguments to a Perl 
subroutine is explicitly left-to-right, because that is specified as the 
order of evaluation of the elements of a LIST.]

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 30 Apr 2000 00:24:05 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: overloading & 'constant' subroutines
Message-Id: <8efuf5$h6p$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to M.J.T. Guy
<mjtg@cus.cam.ac.uk>],
who wrote in article <8ef0ah$for$1@pegasus.csx.cam.ac.uk>:
> >  x * x
> >
> >is, obviously to any Perler ;-),  x(*x).
> >
> >How would one fix this?
> 
> By prototyping subroutine x to have no arguments.

 ... which is an answer to a different question...   :-(

> THough I do question the wisdom of defining a subroutine with the same
> name as a Perl operator.

Try renaming 'x' to 'unused' in the above example...

Ilya


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

Date: Sat, 29 Apr 2000 16:41:42 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Perl modules for AFS
Message-Id: <390B7336.17BE0FB9@My-Deja.com>

> Does anyone know of the existence of Perl modules that consist of AFS
> commands?

Check this
http://www.mpa-garching.mpg.de/~nog/doc/afsindex.htm
---



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

Date: Sat, 29 Apr 2000 19:25:30 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: program that prints itself
Message-Id: <390b372a.46f$3d5@news.op.net>

In article <390B0003.100D4767@vpservices.com>,
Jeff Zucker  <jeff@vpservices.com> wrote:
>Zenin came up with: @ARGV=$0;print<>;

It has a first cousin:

        open+0;print<0>

which is slightly shorter, and possibly even more obscure

Also see http://www.plover.com/~mjd/perl/quine.html


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

Date: Sat, 29 Apr 2000 21:13:43 GMT
From: amarodeeps@my-deja.com
Subject: Re: reading .ost files
Message-Id: <8efj9s$gr5$1@nnrp1.deja.com>

Tom,
Alright, I'm sorry, really.  I definitely was
grumpy yesterday and I know my response was somewhat
biting.  I appreciate you getting back to explain your
position, and I think you realize I over-reacted.
Sorry again.

I definitely was/am frustrated, my company was
just absorbed by another and we went from using
Eudora on Win 9x with sendmail as a server on
Solaris or something (worked fine, though not
my ideal) to a bunch of NT clients with a dumbass
Micro$oft Exchange server system.  We are all
required to use Outlook 2000 now and if I seem
grumpy that definitely has something to do with
it.  Every thing is hidden, I don't feel like
I have any control over my own workstation.

Again, I do appreciate you taking the time to
respond, and I sincerely apologize for snapping
at you like I did.  Thanks for being patient with
me.

> Read::Microsoft::Outlook::Proprietary_Format::Files

-This I found funny, by the way.  Wish it existed...sigh.

Sorry and thanks again,
Dave



In article
<Pine.GSO.4.10.10004281623160.21722-100000@user2.teleport.com>,
  Tom Phoenix <rootbeer@redcat.com> wrote:
> On Fri, 28 Apr 2000 amarodeeps@my-deja.com wrote:
>
> > Tom,
> > You make assumptions without being too helpful.
> >
> > Like this:
> >
> > > Maybe this is the time to go Open Source. :-)
>
> Now, I don't want this to sound condescending, but I honestly don't
know
> any other way to say this. (Anyone who can express the thought of the
> following sentence without a reasonable chance of seeming to be
> condescending should please inform me at once.) The three odd
punctuation
> marks at the end of that line are a "smiley", intending to show that
the
> nearby comments are being delivered in a way which, if you could see
my
> face, would be accompanied by a smile: in short, it's a joke!
>
> > Also there was this, which had an implicit assumption:
> >
> > > Well, you can search CPAN.
>
> I said that in response to your comment, "I am at a loss as to what
> category this type of module would fall under."
>
> > I have searched CPAN.
>
> I hope you can see now that I was merely pointing out that failing to
> know the category doesn't keep you from searching CPAN.
>
> > I guess I should have said so in the first place:  '.ost' brings up
> > nothing.  'outlook' brings up nothing.  'proprietary format' brings
up
> > nothing. 'windows file format' brings up nothing.  'file format'
> > brings up nothing!!  'specification' brings up nothing!!!
>
> Perhaps there is nothing to be found, or perhaps you weren't looking
> properly. I suspect the former.
>
> > Any suggestions?  Look through every category step by step? I don't
> > have the time.  I DON'T WANT TO.  That is why I posted to a
newsgroup.
> > I thought, maybe someone has had experience with this would be
> > gracious enough to share their knowledge.
>
> And someone was, sure enough. If anyone had created a module
called Read::Microsoft::Outlook::Proprietary_Format::Files and put it on
CPAN, I
> think you would have found it by now.
>
> > If you have no idea, then just say so.  Or rather, don't
> > post.  Let someone who does have an idea post.
>
> You sound frustrated. But there are also those who post here, wait a
few
> hours, then post again and complain that no one has answered. I'd
rather
> give you some answer than have you feel the need to post twice. In
your
> case, perhaps I made the wrong choice.
>
> > Don't mean to be so pissy, but I hate it when someone talks to me as
> > if I were an idiot,
>
> I apologize if it has seemed that I was treating you that way. It was
> never my intention. Could I have phrased something differently to
avoid
> that misconception?
>
> > especially when they haven't helped me a lick.
>
> Well, it's not through a lack of trying.
>
> Good luck with your project!
>
> --
> Tom Phoenix       Perl Training and Hacking       Esperanto
> Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/
>
>


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


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

Date: Sat, 29 Apr 2000 23:47:49 GMT
From: helix_r@my-deja.com
Subject: regexp for time stamps
Message-Id: <8efsb3$pvn$1@nnrp1.deja.com>



Hi,

Before I embark on a tedious exercise, I would like
to know if anyone has some clever and tested regexps
to pick up time-stamps in various formats.

I am looking for ways to pick up things like the
following (with one big regexp-- or maybe
multiple regexps):

2000-03-12  12:22:22
2000-03-12 12:22:22 PM
March 12, 2000 12:22 PM
12-MAR-00 12:22:22
3/12/00 12:22:22 pm
12_3_00 12:22:22 PM

 ...etc.... ad (almost) infinitum...






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


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

Date: 29 Apr 2000 19:22:16 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: regexp for time stamps
Message-Id: <87ln1wtp3b.fsf@shleppie.uh.edu>

>> On Sat, 29 Apr 2000 23:47:49 GMT,
>> helix_r@my-deja.com said:

> Hi,

> Before I embark on a tedious exercise, I would like to
> know if anyone has some clever and tested regexps to
> pick up time-stamps in various formats.

> I am looking for ways to pick up things like the
> following (with one big regexp-- or maybe multiple
> regexps):

> 2000-03-12 12:22:22 2000-03-12 12:22:22 PM March 12,
> 2000 12:22 PM 12-MAR-00 12:22:22 3/12/00 12:22:22 pm
> 12_3_00 12:22:22 PM

> ...etc.... ad (almost) infinitum...

A regex may not be the best way to go here.  Have a look
at the documentation for the Date::Calc and Date::Manip
packages.

hth
t


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

Date: Sat, 29 Apr 2000 15:00:36 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Something isn't working, and I can't figure it out
Message-Id: <390B3154.E23A5CAC@attglobal.net>



Tom Phoenix wrote:
> 
> On Sat, 29 Apr 2000, Drew Simonis wrote:
> 
> > Problem summary: The subroutine below, displayed as Item 1,
> 
> Could you cut this down any further? Try to make a small, self-contained
> program which shows the one or two lines which aren't doing what you want,
> with just enough context so that we can try them ourselves.

Thats a good idea.  I'll see if I can isolate the problem.

 
> Well, perl should never fail to give some dying words when it unexpectedly
> has to quit. Probably your other software (a web server, perhaps) is
> hiding that message from you.

Well, I poorly worded that description.  Its not giving an error 
because its doing just as it should.  The script completes just as
if the file was never created.  So I assume that the syntax of the 
open() is bad, but I can't see why it would be.  So the script behaves
just as it should if a) no ref was passed and b) no file is available.
It prints the All done message and exits.  

> 
> There are other ways to do this, but for debugging, I
> sometimes put something like this near the top of a script.
> 
>     # Remove this block when done debugging!
>     BEGIN {
>         local($|) = 1;                  # Temporarily turn off buffering
>         print "Content-type: text/plain\n\n";
>         my $date = localtime;
>         print "Script $0\nrunning on $date (Perl version $])\n\n";
>         unless (open STDERR, ">&STDOUT") {
>             print "Can't redirect STDERR: $!";
>             exit;
>         }
>         print "\n";
>     }
> 
Would the line:

use CGI::Carp qw(FatalsToBrowser); do the same, or does the above
do more?  I'll try it out.  Thanks for all the tips!

-DS


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

Date: Sat, 29 Apr 2000 16:33:44 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Something isn't working, and I can't figure it out
Message-Id: <MPG.13751131e547049b98a9b8@nntp.hpl.hp.com>

In article <390B3154.E23A5CAC@attglobal.net> on Sat, 29 Apr 2000 
15:00:36 -0400, Drew Simonis <care227@attglobal.net> says...

 ...

> Would the line:
> 
> use CGI::Carp qw(FatalsToBrowser); do the same, or does the above
> do more?  I'll try it out.  Thanks for all the tips!

Better try this instead:

  use CGI::Carp qw(fatalsToBrowser);

Someone chose to use stupid studly caps to define the function (instead 
of rational underscores: 'fatals_to_browser'), and this error is the 
result.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

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


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