Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: s/\w/random character/g

by Abigail-II (Bishop)
on Apr 12, 2004 at 21:26 UTC ( #344532=note: print w/replies, xml ) Need Help??

in reply to Re: Re: s/\w/random character/g
in thread s/\w/random character/g

The no warnings qw/syntax/; line seems unnecessary. Is there a reason for it?
For this program, that line doesn't serve any purpose. But then, neither do the two lines above - yet you aren't inquiring about them. The first six lines are generated whenever I type ^A-P (two chars), and I don't bother to remove the last line if it happens to occur in a program where it's unnecessary.

Trying to answer my own question I did re-implement your solution with simple tied scalars, and found no functional difference,
The fact that the entire word is replaced with identical characters didn't strike you as a functional difference? In this specific case, you could get away with using tied scalars if you also used /e, but if letters had to be replaced with a random letter enclosed in parenthesis, using a tied has would lead to:
while you would need something like:
which, while it has less characters, is less obvious, IMO.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://344532]
[Corion]: Meh. I have a very simple mechanism to scrape+track prices, and even to send me mail if something changes (via cron), but SQLite doesn't support window functions, so my simple SQL to determine a price change won't work :-( Maybe I should store the DB ...
[Corion]: ... in Pg, but that would mean that I'd have to deal with credentials and stuff :)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2018-02-23 15:00 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (302 votes). Check out past polls.