Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Website for small perl scripts

by harangzsolt33 (Chaplain)
on Oct 22, 2018 at 14:58 UTC ( [id://1224503]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Website for small perl scripts
in thread Website for small perl scripts

If you're on Windows or Mac you should also be able to install modules. What issue do you have?

I'm using tinyperl on Windows XP. I am not looking for modules but ready-to-use scripts that do various things such as what I am working on right now, the "duplicate file remover."

This project is more like a programming exercise for me. So, even if I find that someone had written this script, I still want to finish writing my own. But it would be neat to see more working scripts. I will probably get a copy of linux and install it on my computer, because I want those perl scripts, especially if they are old, because tinyperl is kind of old.

I like strawberry perl, but I like tinyperl better, because it is tiny. Lol It only takes me 10 seconds to install on a new computer. It's very convenient, and doesn't take up much space.

Btw JPG photos are not like random binary files. I think, it is safe to assume that if I compare the first 70000 bytes, then the photos are the same. Why? JPG photos are so special that even if you try to take two shots of the clear blue sky, you're going to end up with two different files. If you zoom in, there is not a single pixel that is the same! Also, JPG files have a header that contains the name of the camera, the precise date & time the photo was taken and sometimes even the GPS location. If you edit a photo and change just one pixel and save it, the entire file changes and all the header info changes. So, the chances of having two different JPG photos whose sizes match and the first 70000 bytes match is infinitely small.

Replies are listed 'Best First'.
Re^5: Website for small perl scripts
by marto (Cardinal) on Oct 22, 2018 at 16:01 UTC

    "I'm using tinyperl on Windows XP."

    Talk about living in the past. No updates since 2003, download links don't seem to work. is tinyperl dead?.

    "JPG photos are so special that even if you try to take two shots of the clear blue sky, you're going to end up with two different files."

    If you have multiple copies of the same file scatter across the file system, what does this have to do with anything?

    "JPG files have a header that contains the name of the camera, the precise date & time the photo was taken and sometimes even the GPS location."

    Not all JPEG files contain EXIF data, some sites specifically strip such data from uploaded content, before presenting it again.

    "if you edit a photo and change just one pixel and save it, the entire file changes and all the header info changes. So, the chances of having two different JPG photos whose sizes match and the first 70000 bytes match is infinitely small."

    So I took a jpeg I had on this netbook, opened it up in the lightweight editor I have (mtPaint graphic editor), saved it as 'orig.jpg', changed the last pixel on the bottom right to black, saved it as 'changed.jpg'. Did:

    diff -y <(xxd orig.jpg) <(xxd change.jpg) | colordiff >> jpegdiff.txt

    I don't see any changes at all until 00096150:

    00096130: c51d 0bc5 dac7 91ae 69bf f08f 2785 67f2 ........i. 000961 +30: c51d 0bc5 dac7 91ae 69bf f08f 2785 67f2 ........i. 00096140: 0b89 0c3e 6e3c c109 9007 29bb 6170 1f19 ...>n<.... 000961 +40: 0b89 0c3e 6e3c c109 9007 29bb 6170 1f19 ...>n<.... 00096150: 00d6 17c3 4fd9 d7e3 9fc6 bf0f dc78 93e1 ....O..... | 000961 +50: 00d7 ccd7 1e21 f085 bf97 6daa 7c5f f807 .....!.... 00096160: 3f83 3fe1 2cf0 ce89 abdf 783e e75a ce3c ?.?.,..... | 000961 +60: e099 6d04 d630 597c 53f8 c5f0 f3e1 ef88 ..m..0Y|S. 00096170: fd73 4458 24d4 53af f00b eb73 ff00 02af .sDX$.S... | 000961 +70: 7558 b4fb cb9b 09f5 bb3d 17c5 be23 d235 uX.......= 00096180: d072 1c5f d4b2 da79 768d d197 33ba bcb6 .r._...yv. | 000961 +80: 2bad 1a7d 42da fac2 df54 86d9 eca7 bdd3 +..}B....T 00096190: 496b e5b5 ff00 23c1 cc3e 28ed bb7a 5d2d Ik....#..> | 000961 +90: b50b 48e7 69ec ae63 8ff4 1c87 17f5 3cb6 ..H.i..c.. 000961a0: 52bd 936e d777 764f 77bb 6db7 ffd9 R..n.wvOw. | 000961 +a0: 965d bba3 2e67 7579 744b eeda ff00 91e0 .]...guytK > 000961 +b0: e63a 4a37 695d bf25 aa5b 26dd aeee ec9e .:J7i].%.[ > 000961 +c0: ef76 db6f ffd9 .v.o..
Re^5: Website for small perl scripts
by soonix (Canon) on Oct 23, 2018 at 09:54 UTC
    … tinyperl … Lol It only takes me 10 seconds to install on a new Computer.

    The "Portable Editions" of Strawberry Perl don't need to be installed - just download, unzip and open the portableshell batch file.

    You can even install modules from CPAN, and CPANPLUS and cpanminus are also included.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2024-04-19 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found