Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Perl script for serchin file content

by i5513 (Pilgrim)
on Dec 20, 2011 at 09:28 UTC ( #944365=note: print w/replies, xml ) Need Help??

in reply to Perl script for serchin file content

See perlre to see how could pattern be build and customize next code to read the file (using the name of file as argument to your program):

my %items; while (<>) { if (/my(searcheditem)pattern/) { $items{$1}++; } } foreach my $item (keys %items) { do_what_do_you_want $items{$item}; }

We cannot do your homework!

Replies are listed 'Best First'.
Re^2: Perl script for serchin file content
by pavan129 on Dec 20, 2011 at 10:44 UTC
    Bossss dnt do my home work i asked for a help is somebody can.If you cant pleas shut you mouth

      Perhaps you're confused. This isn't a site where you can order people to create scripts for you and expect deliverables, nor is it a place to tell those trying to help you to "pleas shut you mouth".

      I suggest you read and understand PerlMonks for the Absolute Beginner and the rest of Understanding and Using PerlMonks. Doing so will help you understand what this site is for, and how to get the most out of it. You've already been told this isn't a code writing service.

        Those links will only help someone willing to learn and get along. For some individuals that's incompatible with their goals and/or capabilities.


      ok, I will not reply you again.
      We really should, IMO, restore the parent.

      Yes, it's immature but its value (OK, "very minimal value") lies in the manner it characterizes the OP... and it is utterly without "offensive" content, within the usual (artful) meaning of "offensive;" -- profanity, vulgarity and/or NSFW.

      AcidHawk: you really should read about the criteria for considerations. The flaws in the parent that you gave as reasons for reaping are NOT grounds for janitorial action.

        Apologies - I actually did read the node regarding the criteria for considerations .. however I only did that after I had already hastily considered pavan129s' node. Possibly the frustration of the tone in the chatterbox and the lack of any attempt to try something/anything themself led to my incorrect actions.

        I would like to add though "Consideration is the process whereby the general population of the Monastery keeps the site clutter free, by cleaning up badly formatted/titled nodes and petitioning for reaping of undesirable posts." taken from What is consideration?

        I felt that pavan129's node had no value and only added clutter. However I take your point and will be more careful in future.

        Of all the things I've lost in my life, its my mind I miss the most.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://944365]
[choroba]: Good morning!
[Discipulus]: good morning choroba! the eu-crew is complete! ;=)
mxb waves

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2018-05-21 08:06 GMT
Find Nodes?
    Voting Booth?