Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Replace strings in multiple files

by zentara (Archbishop)
on Nov 13, 2012 at 13:18 UTC ( #1003608=note: print w/replies, xml ) Need Help??

in reply to Replace strings in multiple files

Something like this basic File::Find code should show you the right technique. Where I do the print, open and process the file.
#!/usr/bin/perl use warnings; use strict; use File::Find; use File::Basename; my $dir = '.'; my @files; my @exts = qw(wbmp wmf jpeg jpe jpg ani bmp gif ico cur pcx png pnm pb +m pgm ppm ras tga targa xbm tiff tif xpm svg svgz); find( sub { my $file = $File::Find::name; my ($name, $path, $extension) = fileparse($file,'\..*'); substr $extension, 0, 1, ''; #remove leading . if( grep {$_ eq $extension} @exts ){ print "file - $file ext = $extension\n" ; } }, $dir ); #print "@files\n";

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003608]
[Corion]: ... Inferno.js, which uses ES2015) or uses some horrible amount of Javascript infrastructure before you can even render a single file.
[Corion]: I'd really like to create a dynamic frontend for my Google Keep clone, but so far, all the templating solutions seem to bring their own template language or require me to hand-code everything in (their own flavour of) Javascript. I'd like something ...
[Corion]: ... that can use templates from the HTML (via <script language="text/ template">... my template ...</script> and otherwise gets out of my way. But it seems that is not how the Javascript world is, currently :-/
[Corion]: I guess my question is, has anybody worked with React, Ember, Angular (v2, v4, v.whatever) or any other JS client-side dynamic rendering/virtual DOM thingie and found a simple, single-file solution like jQuery?

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2017-03-27 19:03 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (321 votes). Check out past polls.