On 7 23 , 2 28 , [EMAIL PROTECTED] (John W. Krahn) wrote:
> cute wrote:
> > Now i create a temp file to store changed content.
>
> perldoc -q "How do I make a temporary file name"
>
> > is there a simple way to change file content without creating temp
> > files?
>
> > ie:
>
> > while(<>)
> > {
>
John W. Krahn wrote:
Victor Tsang wrote:
if you want to apply this regex to a single file, using the -i option
(in place editing) might be the quickest way for you.
ie.
perl -pe "tr/[a-e]/[1-5]/g" -i
$ perl -c -pe "tr/[a-e]/[1-5]/g"
Bareword found where operator expected at -e line 1, near
Victor Tsang wrote:
if you want to apply this regex to a single file, using the -i option
(in place editing) might be the quickest way for you.
ie.
perl -pe "tr/[a-e]/[1-5]/g" -i
$ perl -c -pe "tr/[a-e]/[1-5]/g"
Bareword found where operator expected at -e line 1, near "tr/[a-e]/[1-5]/g"
syn
if you want to apply this regex to a single file, using the -i option
(in place editing) might be the quickest way for you.
ie.
perl -pe "tr/[a-e]/[1-5]/g" -i
Tor.
cute wrote:
> Now i create a temp file to store changed content.
> is there a simple way to change file content without creating
--- cute <[EMAIL PROTECTED]> wrote:
> Now i create a temp file to store changed content.
> is there a simple way to change file content without
> creating temp
> files?
>
Surely Perl can.
I always use one-line Perl to translate squid's
access.log.Lines on access.log are something like this
form
cute wrote:
Now i create a temp file to store changed content.
perldoc -q "How do I make a temporary file name"
is there a simple way to change file content without creating temp
files?
ie:
while(<>)
{
tr/[a-e]/[1-5]/g
Why are you changing all '[' to '[' and all ']' to ']'? There is n
On 7/23/07, Chas Owens <[EMAIL PROTECTED]> wrote:
On 7/22/07, cute <[EMAIL PROTECTED]> wrote:
> Now i create a temp file to store changed content.
> is there a simple way to change file content without creating temp
> files?
>
> ie:
>
> while(<>)
> {
> tr/[a-e]/[1-5]/g
> print TEMP, $_
> }
Y
On 7/22/07, cute <[EMAIL PROTECTED]> wrote:
Now i create a temp file to store changed content.
is there a simple way to change file content without creating temp
files?
ie:
while(<>)
{
tr/[a-e]/[1-5]/g
print TEMP, $_
}
You can use inplace-editing. Either use -i on the #! line or fiddle
w
Now i create a temp file to store changed content.
is there a simple way to change file content without creating temp
files?
ie:
while(<>)
{
tr/[a-e]/[1-5]/g
print TEMP, $_
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.o