Welcome To Snipplr
Everyone's Recent Snippets Tagged perl
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
I modified this excellent Perl script, created by John Watson (http://www.watson-net.com) to be used with TextMate to reformat your HTML for easier readability. Here's how to use it:
1. In TextMate > Bundles > Bundle Editor > Show Bundle Editor...
1
971
posted 14 years ago by rareyman
I recently had to remove some files from a svn repo.
should work pretty much out of the box, just fill in blatantly exampleish text and read the comments
0
788
posted 15 years ago by spreelanka
export bookmarks.html file, extract links from that file to a list , using the list as INPUT to linkchecker that reports dead links
0
872
posted 15 years ago by rowntreerob
Find the most recently modified file in a directory tree and output its name and modification time. Use index 8 or 10 instead of 9 for access and inode modification time, respectively (see perlfunc manual page - function stat).
This is great for...
0
812
posted 15 years ago by deepsoul
This is inspired by this http://www.cgi101.com/book/ch5/text.html so I'm using a similar example. In PHP you can combine a set of checkboxes into an array using square brackets like this:
<form>
<input> Red<br>
<input> Green<br>...
1
1056
posted 15 years ago by ptepper
This example demonstrates a way to control Adobe InDesign from Perl. Tested on MacOS X 10.5.7 and INDD.
0
736
posted 15 years ago by myhd
# useful links:
# (WMI space definition) http://msdn.microsoft.com/en-us/library/aa394084(VS.85).aspx
# (OLE usage on CPAN) http://cpan.uwinnipeg.ca/htdocs/Win32-OLE/Win32/OLE.html#Object_methods_and_properties
1
1077
posted 15 years ago by vinocui
For database inserts must be made some site on "http://redirect_host:port/.../" with nice getip function: http://snipplr.com/view/10946/
0
902
posted 15 years ago by paramah
Replace all the occurrences of a string with a replacement in the supplied files.
2
967
posted 15 years ago by sanjivarunsahayamhotmailcom
Used for converting, compiling, and reversing tiff files from the Book Center's digital library.
0
630
posted 16 years ago by rubinsta
This Perl one-liner will remove all newline characters from a text file, replacing them with a space. In the source, all newline characters in the file gear_list.xml are replaced with spaces, and the original file is saved as gear_list.xml.bak
0
905
posted 16 years ago by retry
\Q...\E perl quoting means no ugly escaping in the regex. find's -print0 with xargs -0 is the secret to handling files with spaces in their names.
1
1134
posted 16 years ago by ches
In response to a very simplistic solution suggestion using Shell, here is a basic version of what I use. The advantage of the solution below is that it is supposed to be much faster on directories with many files (I regularly use its full-blown versi...
0
794
posted 16 years ago by amosshapira
Yes, this is valid code.
Designed by myself, unless otherwise noted.
0
1233
posted 16 years ago by darkphotn