Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports.
10
votes
Accepted
Search and replace on command line
You can use -p option (see perl --help):
assume loop like -n but print line also, like sed
So the script becomes:
echo hi | perl -pe 's/i/o/g'
which is really compiled to:
$ perl -MO=Deparse …
1
vote
Accepted
More elegant way to get timestamp from day/hour? (Perl)
There's a timestamp file available here: http://coolwx.com/buoydata/data/curr/timestamp, so I think it'll be easier if you download and parse both data and timestamp files.
You can parse the timesta …
6
votes
Accepted
What changes, if any, are required to make the following Perl eval bullet proof?
Ad. 1. Yes and no - there are still some pitfalls (please read further).
Ad. 2. You must remember about returning truthy value from eval block because it evaluates to last value in block unless some …