Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How to Teach Perl to Scholars in the Humanities

by johndageek (Hermit)
on Jan 30, 2004 at 21:03 UTC ( [id://325396]=note: print w/replies, xml ) Need Help??


in reply to How to Teach Perl to Scholars in the Humanities

Question, how do they search now?

Have them find particular text using their current method, then try one of the two below.

Of course perl needs to be on their box for the second one. But many people will gravitate toward something they are convinced is better/faster/easier than the way they are doing it now.

if they are using unix or cygwin try
grep -n text_to_search_for filename

#!/usr/bin/perl ## put your file name in below $your_file="file name goes here"; ## open in, "$your_file" or die "could not open $your_file\n"; ## loops through file while (<in>) { $line_count++; ## in the line below put the text to search for between the / and / print "$line_count - $_" if (/text to find/); }

Good luck, HTH!
dageek

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://325396]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found