Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

to uppercase one liner help

7 views
Skip to first unread message

h3r0

unread,
Jun 21, 2005, 8:59:49 AM6/21/05
to
hi

can anyone help with a one liner that reads a string from a file and
converts it to uppercase.

the string is always in this format


abcd0101a01

thanks for your time.

A. Sinan Unur

unread,
Jun 21, 2005, 9:01:06 AM6/21/05
to
"h3r0" <h3...@my-deja.com> wrote in news:1119358789.698105.163880
@g43g2000cwa.googlegroups.com:

See perldoc perlfunc

You would also benefit from consulting the posting guidelines for this
newsgroup to find out how you can help yourself and help others help you.

Sinan

--
A. Sinan Unur <1u...@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

Jürgen Exner

unread,
Jun 21, 2005, 9:07:33 AM6/21/05
to
h3r0 wrote:
> can anyone help with a one liner that reads a string from a file and
> converts it to uppercase.

I suggest "perldoc -f uc"

jue


Sherm Pendley

unread,
Jun 21, 2005, 8:17:52 AM6/21/05
to
"h3r0" <h3...@my-deja.com> writes:

> can anyone help with a one liner that reads a string from a file and
> converts it to uppercase.

It's generally expected that you try something first, and then ask for help
if you're having trouble.

For hints getting started, have a look at:

perldoc -f open
perldoc -f uc

For a more extensive tutorial concerning opening and working with files:

perldoc perlopentut

sherm--

h3r0

unread,
Jun 21, 2005, 9:18:34 AM6/21/05
to
i know, its just that im running out of time, this has to be done by
yesterday!

Sherm Pendley

unread,
Jun 21, 2005, 8:30:23 AM6/21/05
to
"h3r0" <h3...@my-deja.com> writes:

> i know, its just that im running out of time, this has to be done by
> yesterday!

You know what? Please quote enough context in your replies to give others
some idea what you're talking about.

Your best bet, if you want code written to specification and delivered on a
deadline, is posting an ad to one of the jobs groups. This group is here to
help you learn to write Perl, not to write Perl for you.

Have you read the posting guidelines for this group? Or those for Google
Groups, for that matter?

sherm--

h3r0

unread,
Jun 21, 2005, 9:37:57 AM6/21/05
to
if you read the thread you know what i am talking about!

look if u dont want to help then dont go on about it!, someone else
with skills and willingness may help.

Paul Lalli

unread,
Jun 21, 2005, 9:41:29 AM6/21/05
to
h3r0 wrote:
> if you read the thread you know what i am talking about!

Okay, so *you're* asking *us* for help, but *we* should be the ones who
change the method by which we read this newsgroup, to better serve
*you*?

You have a funny sense of priorities.

> look if u dont want to help then dont go on about it!, someone else
> with skills and willingness may help.

You've been given plenty of help already. Can you explain how the
documentation you were pointed to did not answer your question?

Paul Lalli

A. Sinan Unur

unread,
Jun 21, 2005, 9:43:40 AM6/21/05
to
"h3r0" <h3...@my-deja.com> wrote in news:1119359913.990185.261930
@g49g2000cwa.googlegroups.com:

> i know,

What do you know?

Please some quote some context when replying.

> its just that im running out of time, this has to be done by
> yesterday!

Then, maybe, you should have read the docs yesterday.

Jürgen Exner

unread,
Jun 21, 2005, 9:44:20 AM6/21/05
to

How come that you have to repeat the same stuff over and over again?
I just wrote this below in a different thread:

<quote>
You don't seem to know much about Usenet. Because of its asynchronous,
distributed implementation there is no guarantee that articles
- arrive on a server in a specific order
- arrive on a server at all
- are available on a server at any specific moment in time
- are visible to a user now
- have been visible to a user in the past
- will ever be visible to a user
To make a long story short: you can never assume that Joe Reader can see or
has seen the same set of articles as you.

Therefore, and to make reading more efficient (no need to scroll back to a
previous article and most important knowing exactly which part of a
preceeding article someone is commenting on) it has been a proven Usenet
custom for the last two decades to quote just so much context from the
preceeding article that your posting is understandable without someone
reading the preceeding article. He may not had a chance to read it.
</quote>

jue


A. Sinan Unur

unread,
Jun 21, 2005, 9:47:25 AM6/21/05
to
"h3r0" <h3...@my-deja.com> wrote in news:1119361077.627758.12750
@g44g2000cwa.googlegroups.com:

> if you read the thread you know what i am talking about!

As has been pointed out many times in this group, while Google Groups is
an excellent *archive*, its web interface fails as a newsreader. As a
person who has chosen Google Groups as your interface to UseNet, it is
your responsibility to make sure you abide by time honoured conventions.
One of those conventions is to quote an appropriate amount of context when
replying. For more such niceties, see Google's own recommendations.



> look if u dont want to help then dont go on about it!,

As you wish.

> someone else with skills and willingness may help.

Unlikely, but there is always hope.

*PLONK*

Sherm Pendley

unread,
Jun 21, 2005, 8:51:14 AM6/21/05
to
"h3r0" <h3...@my-deja.com> writes:

> if you read the thread you know what i am talking about!

If *who* reads *what* thread? We're not all using Google Groups.

> look if u dont want to help then dont go on about it!, someone else
> with skills and willingness may help.

Crybaby detected, attitude filter engaging.

*plonk*

sherm--

h3r0

unread,
Jun 21, 2005, 9:53:50 AM6/21/05
to
well get a proper news reader twat :)

Brian Wakem

unread,
Jun 21, 2005, 10:01:17 AM6/21/05
to


I was going to help, but having just viewed your replies in this thread
I have changed my mind.


--
Brian Wakem

Paul Lalli

unread,
Jun 21, 2005, 10:05:17 AM6/21/05
to
h3r0 wrote:
> well get a proper news reader twat :)

*warning warning* Irony Overload *warning warning*

Google Groups is NOT a "proper news reader". It is, in fact, one of
the sorriest excuses for a news reader yet invented. Google Groups is
GREAT for an archive. For posting and reading daily newsgroups, it's
terrible. Perhaps the worst product Google has come up with.

More to the point, we (that is, the regulars, the ones who generally
*answer* the questions, rather than only ask), do not desire to read
posts by thread, simply because we, unlike those who are asking the
questions, are not reading just one thread. When someone posts a
question, like yourself, that person tends to only focus on that
message's thread, so of course you want to read just that thread, and
threading the messages helps you. The answering participants, however,
are reading pretty much EVERY message posted, and so it makes far more
sense to read messages as they arrive, or to see messages that have
arrived since the last time we checked.

Since you are ASKING for help, it would be most helpful for you to help
yourself, and that would involve posting in the way that that enables
the people most likely to respond to read and understand your messages.

Paul Lalli

Jürgen Exner

unread,
Jun 21, 2005, 10:18:10 AM6/21/05
to
h3r0 wrote:
> well get a proper news reader twat :)

Organization: http://groups.google.com
User-Agent: G2/0.2

Well, I can't deny it, this statement from someone who is using Google
Groups as a newreader is quite aehhmm, shall we say "interesting"?

jue


Gunnar Hjalmarsson

unread,
Jun 21, 2005, 10:21:06 AM6/21/05
to
Paul Lalli wrote:
> More to the point, we (that is, the regulars, the ones who generally
> *answer* the questions, rather than only ask), do not desire to read
> posts by thread, simply because we, unlike those who are asking the
> questions, are not reading just one thread. When someone posts a
> question, like yourself, that person tends to only focus on that
> message's thread, so of course you want to read just that thread, and
> threading the messages helps you. The answering participants, however,
> are reading pretty much EVERY message posted, and so it makes far more
> sense to read messages as they arrive, or to see messages that have
> arrived since the last time we checked.

I'm reading posts by thread, but have my newsreader (Thunderbird) set to
only show threads with unread posts.

Just a tip. :)

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Tad McClellan

unread,
Jun 21, 2005, 12:14:28 PM6/21/05
to
h3r0 <h3...@my-deja.com> wrote:

> i know, its just that im running out of time, this has to be done by
> yesterday!


While getting other people to do your work for you may work this time,
it may prove a bad decision in the long run.

So long!


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

Ilmari Karonen

unread,
Jun 22, 2005, 4:08:52 AM6/22/05
to
h3r0 <h3...@my-deja.com> kirjoitti 21.06.2005:
>
> can anyone help with a one liner that reads a string from a file and
> converts it to uppercase.
>
> the string is always in this format
>
> abcd0101a01

Well, with such a well defined specification, the job should be easy.

perl -e '$_ = <>; /^abcd0101a01$/ or die; print "ABCD0101A01\n";'

There. That should do it, I think.

(No, I'm not being serious. If I were, I could've easily given you a
"real" solution, but since you said it was due yesterday, I guess you
don't really need it anymore...)

--
Ilmari Karonen
To reply by e-mail, please replace ".invalid" with ".net" in address.

0 new messages