SVN : Merge a branch back into the trunk

How to copy a branch called V2 into the trunk :

I. find the first revision "V2"

in V2 directory type :
[pene@donunix] svn log --stop-on-copy

note the latest revision number displayed (for us it's 270)

II. find the latest V2 revision

in V2 directory type :
[pene@donunix]svn up

note the revision number displayed (for us it's 1603)

III. merge the branch into the trunk

in V2 directory type :
[pene@donunix]svn merge -r270:1603 https://my.svn.server/path/code/branch/V2

and commit:
[pene@donunix]svn ci -m "Merge V2 branch back into the trunk"

[Perl] a one-line command to create a random number

Here is how to create a random number between 0 and 100 with this simple perl one-line command :

[pene@donunix] perl -e "print int(rand(100))"

grep -v in Perl one-line

How to create the grep -v command in Perl, here is the clue :

[pene@donunix] perl -ne "! /your_string/ && print" file.txt

And if you want to write the output directly into the input file (file.txt), just type this :
[pene@donunix] perl -i.bak -ne "! /your_string/ && print" file.txt

SVN : How to restore an older version of my current file ?

I want to restore an older version (from the SVN revision number 1289) of my current file fic.pl, what can I do ? 

Here is the tips (NB my current revision is 1492) :

[npene@donunix] svn merge -r 1492:1289 fic.pl

[Perl] One liner calculus

In the following example file « calc.txt », I want to multiply each number by 2/3 :

199,119
326,147
385,345
250,330
157,218
67,241
402,175

Here is the solution in one line with Perl :

[pene@donunix] perl -pi.bak -e 's|(\d+),(\d+)|int($1*2/3).",".int($2*2/3)|e' calc.txt