[29665] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 909 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 5 14:14:20 2007

Date: Fri, 5 Oct 2007 11:14:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 5 Oct 2007     Volume: 11 Number: 909

Today's topics:
        Reading a files's name <lerameur@yahoo.com>
    Re: Reading a files's name <josef.moellers@fujitsu-siemens.com>
    Re: Reading a files's name <lerameur@yahoo.com>
    Re: Reading a files's name <kenslaterpa@hotmail.com>
    Re: Reading a files's name <lerameur@yahoo.com>
    Re: Reading a files's name <lerameur@yahoo.com>
    Re: Reading a files's name <glex_no-spam@qwest-spam-no.invalid>
    Re: Reading a files's name <lerameur@yahoo.com>
    Re: Reading a files's name <glex_no-spam@qwest-spam-no.invalid>
        Threads in perl for Solaris <mohdejaz@yahoo.com>
    Re: Threads in perl for Solaris <simon.chao@fmr.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 05 Oct 2007 07:28:07 -0700
From:  lerameur <lerameur@yahoo.com>
Subject: Reading a files's name
Message-Id: <1191594487.807821.144550@y42g2000hsy.googlegroups.com>

hi all,

I want to be able to read a file and copy that file with the same name
in another directory. I do not know the name of the file as it is a
log file, here is an example of files:

07100510555501.log
07100510555503.log
07100511555501.log

where the time stamp is 07100510 =year month day hour
and 5555 = constant
01 03,  interval constant, two per hour.

I can read a file with time stamp only. but adding the constant and
interval constant is throwing me off track.
can some one help me

ken



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

Date: Fri, 05 Oct 2007 16:43:31 +0200
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: Reading a files's name
Message-Id: <fe5iik$b4n$2@nntp.fujitsu-siemens.com>

lerameur wrote:
> hi all,
>=20
> I want to be able to read a file and copy that file with the same name
> in another directory. I do not know the name of the file as it is a
> log file, here is an example of files:
>=20
> 07100510555501.log
> 07100510555503.log
> 07100511555501.log
>=20
> where the time stamp is 07100510 =3Dyear month day hour
> and 5555 =3D constant
> 01 03,  interval constant, two per hour.
>=20
> I can read a file with time stamp only. but adding the constant and
> interval constant is throwing me off track.
> can some one help me

Your question is not very clear.
What have you tried so far ("I can read a file with time stamp only.")=20
and where are your problems in that code?

--=20
These are my personal views and not those of Fujitsu Siemens Computers!
Josef M=F6llers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize (T.  Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html



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

Date: Fri, 05 Oct 2007 08:17:48 -0700
From:  lerameur <lerameur@yahoo.com>
Subject: Re: Reading a files's name
Message-Id: <1191597468.432564.177420@50g2000hsm.googlegroups.com>

On Oct 5, 10:43 am, Josef Moellers <josef.moell...@fujitsu-
siemens.com> wrote:
> lerameur wrote:
> > hi all,
>
> > I want to be able to read a file and copy that file with the same name
> > in another directory. I do not know the name of the file as it is a
> > log file, here is an example of files:
>
> > 07100510555501.log
> > 07100510555503.log
> > 07100511555501.log
>
> > where the time stamp is 07100510 =3Dyear month day hour
> > and 5555 =3D constant
> > 01 03,  interval constant, two per hour.
>
> > I can read a file with time stamp only. but adding the constant and
> > interval constant is throwing me off track.
> > can some one help me
>
> Your question is not very clear.
> What have you tried so far ("I can read a file with time stamp only.")
> and where are your problems in that code?
>
> --
> These are my personal views and not those of Fujitsu Siemens Computers!
> Josef M=F6llers (Pinguinpfleger bei FSC)
>         If failure had no penalty success would not be a prize (T.  Pratc=
hett)
> Company Details:http://www.fujitsu-siemens.com/imprint.html

I want to read these filename
 07100510555501.log
 07100510555503.log
 07100510555505.log
 07100511555501.log
 07100511555503.log
 07100511555505.log
 07100512555501.log
 07100512555503.log
 07100512555505.log
etc
I want to change  parameters in every log files and save them with the
same name.
Right now I use for testing filenames with one log per hour, so I can
use his:
my $filename =3D glob("$year2$month2$day2$*")
and have the hours increase by one. That is easy

Now I have three log per hour, with 3 different endings.

K



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

Date: Fri, 05 Oct 2007 08:41:33 -0700
From:  kens <kenslaterpa@hotmail.com>
Subject: Re: Reading a files's name
Message-Id: <1191598893.160077.281450@50g2000hsm.googlegroups.com>

On Oct 5, 11:17 am, lerameur <leram...@yahoo.com> wrote:
> On Oct 5, 10:43 am, Josef Moellers <josef.moell...@fujitsu-
>
>
>
> siemens.com> wrote:
> > lerameur wrote:
> > > hi all,
>
> > > I want to be able to read a file and copy that file with the same name
> > > in another directory. I do not know the name of the file as it is a
> > > log file, here is an example of files:
>
> > > 07100510555501.log
> > > 07100510555503.log
> > > 07100511555501.log
>
> > > where the time stamp is 07100510 =3Dyear month day hour
> > > and 5555 =3D constant
> > > 01 03,  interval constant, two per hour.
>
> > > I can read a file with time stamp only. but adding the constant and
> > > interval constant is throwing me off track.
> > > can some one help me
>
> > Your question is not very clear.
> > What have you tried so far ("I can read a file with time stamp only.")
> > and where are your problems in that code?
>
> > --
> > These are my personal views and not those of Fujitsu Siemens Computers!
> > Josef M=F6llers (Pinguinpfleger bei FSC)
> >         If failure had no penalty success would not be a prize (T.  Pra=
tchett)
> > Company Details:http://www.fujitsu-siemens.com/imprint.html
>
> I want to read these filename
>  07100510555501.log
>  07100510555503.log
>  07100510555505.log
>  07100511555501.log
>  07100511555503.log
>  07100511555505.log
>  07100512555501.log
>  07100512555503.log
>  07100512555505.log
> etc
> I want to change  parameters in every log files and save them with the
> same name.
> Right now I use for testing filenames with one log per hour, so I can
> use his:
> my $filename =3D glob("$year2$month2$day2$*")
> and have the hours increase by one. That is easy
>
> Now I have three log per hour, with 3 different endings.
>
> K

I am not sure I understand your question totally.
If you are changing all of the log files, why not use the readdir
function to get the file names?

perldoc -f readdir

HTH, Ken



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

Date: Fri, 05 Oct 2007 08:49:59 -0700
From:  lerameur <lerameur@yahoo.com>
Subject: Re: Reading a files's name
Message-Id: <1191599399.331918.141160@d55g2000hsg.googlegroups.com>

On Oct 5, 11:41 am, kens <kenslate...@hotmail.com> wrote:
> On Oct 5, 11:17 am, lerameur <leram...@yahoo.com> wrote:
>
>
>
> > On Oct 5, 10:43 am, Josef Moellers <josef.moell...@fujitsu-
>
> > siemens.com> wrote:
> > > lerameur wrote:
> > > > hi all,
>
> > > > I want to be able to read a file and copy that file with the same n=
ame
> > > > in another directory. I do not know the name of the file as it is a
> > > > log file, here is an example of files:
>
> > > > 07100510555501.log
> > > > 07100510555503.log
> > > > 07100511555501.log
>
> > > > where the time stamp is 07100510 =3Dyear month day hour
> > > > and 5555 =3D constant
> > > > 01 03,  interval constant, two per hour.
>
> > > > I can read a file with time stamp only. but adding the constant and
> > > > interval constant is throwing me off track.
> > > > can some one help me
>
> > > Your question is not very clear.
> > > What have you tried so far ("I can read a file with time stamp only.")
> > > and where are your problems in that code?
>
> > > --
> > > These are my personal views and not those of Fujitsu Siemens Computer=
s!
> > > Josef M=F6llers (Pinguinpfleger bei FSC)
> > >         If failure had no penalty success would not be a prize (T.  P=
ratchett)
> > > Company Details:http://www.fujitsu-siemens.com/imprint.html
>
> > I want to read these filename
> >  07100510555501.log
> >  07100510555503.log
> >  07100510555505.log
> >  07100511555501.log
> >  07100511555503.log
> >  07100511555505.log
> >  07100512555501.log
> >  07100512555503.log
> >  07100512555505.log
> > etc
> > I want to change  parameters in every log files and save them with the
> > same name.
> > Right now I use for testing filenames with one log per hour, so I can
> > use his:
> > my $filename =3D glob("$year2$month2$day2$*")
> > and have the hours increase by one. That is easy
>
> > Now I have three log per hour, with 3 different endings.
>
> > K
>
> I am not sure I understand your question totally.
> If you are changing all of the log files, why not use the readdir
> function to get the file names?
>
> perldoc -f readdir
>
> HTH, Ken

Ok here are the name again:
  07100510555501.log
 07100510555503.log
 07100510555505.log
 07100511555501.log
 07100511555503.log
 07100511555505.log
 07100512555501.log
 07100512555503.log
 07100512555505.log
 I need to open 07100510555501.log
I can use
-glob($year$month$day$hour*)
-read the file
- hours++
then read the following file.... but oupss  I have three files within
that hour.
How do I read the 01, 03 and 05 near the end of the file so I can
treat these seperatly?

k



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

Date: Fri, 05 Oct 2007 09:00:09 -0700
From:  lerameur <lerameur@yahoo.com>
Subject: Re: Reading a files's name
Message-Id: <1191600009.345717.263490@k79g2000hse.googlegroups.com>

On Oct 5, 11:49 am, lerameur <leram...@yahoo.com> wrote:
> On Oct 5, 11:41 am, kens <kenslate...@hotmail.com> wrote:
>
>
>
> > On Oct 5, 11:17 am, lerameur <leram...@yahoo.com> wrote:
>
> > > On Oct 5, 10:43 am, Josef Moellers <josef.moell...@fujitsu-
>
> > > siemens.com> wrote:
> > > > lerameur wrote:
> > > > > hi all,
>
> > > > > I want to be able to read a file and copy that file with the same=
 name
> > > > > in another directory. I do not know the name of the file as it is=
 a
> > > > > log file, here is an example of files:
>
> > > > > 07100510555501.log
> > > > > 07100510555503.log
> > > > > 07100511555501.log
>
> > > > > where the time stamp is 07100510 =3Dyear month day hour
> > > > > and 5555 =3D constant
> > > > > 01 03,  interval constant, two per hour.
>
> > > > > I can read a file with time stamp only. but adding the constant a=
nd
> > > > > interval constant is throwing me off track.
> > > > > can some one help me
>
> > > > Your question is not very clear.
> > > > What have you tried so far ("I can read a file with time stamp only=
 .")
> > > > and where are your problems in that code?
>
> > > > --
> > > > These are my personal views and not those of Fujitsu Siemens Comput=
ers!
> > > > Josef M=F6llers (Pinguinpfleger bei FSC)
> > > >         If failure had no penalty success would not be a prize (T. =
 Pratchett)
> > > > Company Details:http://www.fujitsu-siemens.com/imprint.html
>
> > > I want to read these filename
> > >  07100510555501.log
> > >  07100510555503.log
> > >  07100510555505.log
> > >  07100511555501.log
> > >  07100511555503.log
> > >  07100511555505.log
> > >  07100512555501.log
> > >  07100512555503.log
> > >  07100512555505.log
> > > etc
> > > I want to change  parameters in every log files and save them with the
> > > same name.
> > > Right now I use for testing filenames with one log per hour, so I can
> > > use his:
> > > my $filename =3D glob("$year2$month2$day2$*")
> > > and have the hours increase by one. That is easy
>
> > > Now I have three log per hour, with 3 different endings.
>
> > > K
>
> > I am not sure I understand your question totally.
> > If you are changing all of the log files, why not use the readdir
> > function to get the file names?
>
> > perldoc -f readdir
>
> > HTH, Ken
>
> Ok here are the name again:
>   07100510555501.log
>  07100510555503.log
>  07100510555505.log
>  07100511555501.log
>  07100511555503.log
>  07100511555505.log
>  07100512555501.log
>  07100512555503.log
>  07100512555505.log
>  I need to open 07100510555501.log
> I can use
> -glob($year$month$day$hour*)
> -read the file
> - hours++
> then read the following file.... but oupss  I have three files within
> that hour.
> How do I read the 01, 03 and 05 near the end of the file so I can
> treat these seperatly?
>
> k

How ccan I put the filename into an array? is ti possible?
this way I could Identify every field

k



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

Date: Fri, 05 Oct 2007 11:09:30 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Reading a files's name
Message-Id: <470661ba$0$497$815e3792@news.qwest.net>

lerameur wrote:
> On Oct 5, 11:49 am, lerameur <leram...@yahoo.com> wrote:
[...]
>> Ok here are the name again:
>>   07100510555501.log
>>  07100510555503.log
>>  07100510555505.log
>>  07100511555501.log
>>  07100511555503.log
>>  07100511555505.log
>>  07100512555501.log
>>  07100512555503.log
>>  07100512555505.log
>>  I need to open 07100510555501.log
>> I can use
>> -glob($year$month$day$hour*)
>> -read the file
>> - hours++

Ahhh.. that doesn't compile.  Next time, provide your
actual code!

>> then read the following file.... but oupss  I have three files within
>> that hour.
>> How do I read the 01, 03 and 05 near the end of the file so I can
>> treat these seperatly?
>>
>> k
> 
> How ccan I put the filename into an array? is ti possible?
> this way I could Identify every field

Using your example:

my @files = glob( "$year2$month2$day2$*" );

No idea why that ends with "$*"...


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

Date: Fri, 05 Oct 2007 09:26:31 -0700
From:  lerameur <lerameur@yahoo.com>
Subject: Re: Reading a files's name
Message-Id: <1191601591.436344.234270@22g2000hsm.googlegroups.com>

On Oct 5, 12:09 pm, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
wrote:
> lerameur wrote:
> > On Oct 5, 11:49 am, lerameur <leram...@yahoo.com> wrote:
> [...]
> >> Ok here are the name again:
> >>   07100510555501.log
> >>  07100510555503.log
> >>  07100510555505.log
> >>  07100511555501.log
> >>  07100511555503.log
> >>  07100511555505.log
> >>  07100512555501.log
> >>  07100512555503.log
> >>  07100512555505.log
> >>  I need to open 07100510555501.log
> >> I can use
> >> -glob($year$month$day$hour*)
> >> -read the file
> >> - hours++
>
> Ahhh.. that doesn't compile.  Next time, provide your
> actual code!
>
> >> then read the following file.... but oupss  I have three files within
> >> that hour.
> >> How do I read the 01, 03 and 05 near the end of the file so I can
> >> treat these seperatly?
>
> >> k
>
> > How ccan I put the filename into an array? is ti possible?
> > this way I could Identify every field
>
> Using your example:
>
> my @files = glob( "$year2$month2$day2$*" );
>
> No idea why that ends with "$*"...

ok typo
my @files = glob( "$year2$month2$day2*" );

I am now trying to use the substr  function with no luck



k




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

Date: Fri, 05 Oct 2007 11:39:40 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Reading a files's name
Message-Id: <470668cc$0$493$815e3792@news.qwest.net>

lerameur wrote:
> On Oct 5, 12:09 pm, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
[...]
> my @files = glob( "$year2$month2$day2*" );
> 
> I am now trying to use the substr  function with no luck

I am now trying to give you the same advice..again.. Post
your code.

How can anyone help you if you don't show us what you're
trying to do?

In the meantime, read the documentation:

perldoc -f substr


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

Date: Fri, 05 Oct 2007 10:35:23 -0700
From:  mohdejaz <mohdejaz@yahoo.com>
Subject: Threads in perl for Solaris
Message-Id: <1191605723.443245.164970@o3g2000hsb.googlegroups.com>

Is there threads support in perl for Solaris? I checked with SA and he
said there was no "threads.pm" for Solaris. Please advise...



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

Date: Fri, 05 Oct 2007 17:39:37 -0000
From:  it_says_BALLS_on_your forehead <simon.chao@fmr.com>
Subject: Re: Threads in perl for Solaris
Message-Id: <1191605977.477347.128360@y42g2000hsy.googlegroups.com>

On Oct 5, 1:35 pm, mohdejaz <mohde...@yahoo.com> wrote:
> Is there threads support in perl for Solaris? I checked with SA and he
> said there was no "threads.pm" for Solaris. Please advise...

yes, but you need to configure Perl with threads prior to the
installation.

Thread support is a Perl compile-time option - it's something that's
turned on or off when Perl is built at your site, rather than when
your programs are compiled. If your Perl wasn't compiled with thread
support enabled, then any attempt to use threads will fail.

There should be no issues specific to Solaris regarding Perl threads.



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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V11 Issue 909
**************************************


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