Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Linux Ask!

Jul 252010
 

Multi-line string in PHP

Answer:

To assign a multi-line string to a variable, is easy with the Heredoc

E.g.

<?php

$text = <<<EOT
<p>
this "is" a 'test'
</p>
EOT;

echo $text;
Jul 242010
 

Multiline string in Perl

Answer:

You can either use the q operators.

my $s = q#''''"
test
"""'
#;
print $s;

Or qq operators if you need interpolation.

my $d = "test";
my $s = qq#''''"
$d
"""'
#;

print $s;
Jul 232010
 

Creating a simple tag in SVN

Answer:

In SVN, a tag is a “snapshot” of a project in time. By creating a tag of a project, this allow you to easily reference a particular version sometimes later.

To create a tag, use svn copy:

# svn copy http://example.com/svn/repos/demo/trunk \
           http://example.com/svn/repos/demo/tags/release-1.0.0 \
      -m "Tagging the 1.0.0 release of the 'demo' project."

Committed revision 124.