Hi Dave
That did what I wanted and very well too :-)
I had got all of file into array and was hacking away when this came to me
so - thanks a lot.
I'll put in the solution with arrays also , just for record. The solution
using the config inifile module is also pretty elegant and custom made for
th
Hello Gurus,
I am very sorry, if this post is on wrong list.
I have a perl script, which gives dynamic page with search files list.
Pdf and text files are displaying in browser, when clicking in the link of
file.
But, I want to save on to disk, instead displaying in browser.
Like:
On click a hy
Hi all
I'm trying to parse a text file match a pattern and if it does pick up the
line after and make changes to it
if a file has matter such as
[abc]
username = sssh
password = ghsgas
[def]
username = ghshgs
password = hsjhsa
[jwg]
username = shjsjhsa
password = jhsjhs
I need to , say substi
Well, I'm not sure what you mean by "anything upto a tilda", but you can
write 1 regex to do what you want:
$ more test.pl
#!/usr/bin/perl
$line = '(^FLJK asdf435jk~@!#$';
print "LINE (before): $line\n";
$line =~ s/[^\w\s~]//g;
print "LINE (after): $line\n";
$ perl test.pl
LINE (before): (^FL
Could someone let me know how I take out any non printable characters from a
string, i.e. anything except a-z, 0-9, space, and I think anything upto a
tilda , if it's possible in 1 regex it would be great..
thanks
Geoff
___
Perl-Unix-Users mailing li