On 2022-10-10 18:12, Henrik Park wrote:
I know "/" is a special character for regex, which should be escaped.
But if I put "/" in a variable and use the variable in regex, then it
doesn't need the explicit escape. Like this one:
$ perl -le '$delimiter="/"; $str="hello/world/buddy";
@list=sp
Hello
I know "/" is a special character for regex, which should be escaped.
But if I put "/" in a variable and use the variable in regex, then it
doesn't need the explicit escape. Like this one:
$ perl -le '$delimiter="/"; $str="hello/world/buddy";
@list=split/$delimiter/,$str;print "@list"'
Hi Vijay,
I don't think that we change default character because it's in perl's
inbuild code.
Thanks,
Mahesh
On Wed, Oct 28, 2009 at 9:05 AM, Vijay Gururaja
wrote:
> Hi, All!
>
> The default character to escape is backslash (\). Is there any way to
> redefine this and set it to any other char
> "VG" == Vijay Gururaja writes:
VG> Hi, All!
VG>The default character to escape is backslash (\). Is there any way
VG> to redefine this and set it to any other character?
VG>For e.g. if I wanted to use '^' instead of '\'.
VG>*print "Hello World ^n";*
it can't be done
Hi, All!
The default character to escape is backslash (\). Is there any way
to redefine this and set it to any other character?
For e.g. if I wanted to use '^' instead of '\'.
*print "Hello World ^n";*
Thanks,
Vijay Gururaja
> I'm pretty sure all sane user and admin tools forbid this,
> although if you edit /etc/passwd (shadow?) directly, you deserve
> your BOFH award. :)
Thanks everyone for your input and i used successfully chown/chmod in
my routines as provided by John Krahn.
Yes, it is username and not the uid!!
> ""John" == "John W Krahn" <[EMAIL PROTECTED]> writes:
>>> # If 29334 is the user *name* and not the UID
>>> # then do this instead:
>>> #return if getpwuid( $uid ) ne '29334';
If you have a strictly numeric username, life will be a real pain.
I'm pretty sure all sane user and admin tools f
Pad wrote:
On Feb 8, 6:24 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
This may work better (UNTESTED):
#!/bin/perl
use warnings;
use strict;
use File::Find;
my $tagname = 'XYZ';
my $user= getpwnam 'orauser';
my $seq = '01';
find sub {
my ( $uid, $gid ) = ( lstat )[ 4, 5 ];
On Feb 8, 2008 12:52 PM, Pad <[EMAIL PROTECTED]> wrote:
> Can you pl.help me how to get chmod cmd that I am trying to set run
> on those directories. I was thinking of using system (" find ... -
> exec chmod 755 {} \; ")
So, does Perl's chmod() function work for you? You should be able to
us
(please notice '\' just before semi-colon).
>
> > I used 'echo' statement just to show you what is the problem. In
> > reality, I wanted to use find cmd to change the permission say,
>
> > system( " find /${tagname}_$seq/oradata/$tagname -user
agname -user 29334 -exec
chown $user {} \\\; ");
Please let me know why the escape character does n't work for me? Any
help to resolve the problem is much appreciated.
This may work better (UNTESTED):
#!/bin/perl
use warnings;
use strict;
use File::Find;
my $tagname = 'XYZ
user 29334 -exec
chown $user {} \\\; ");
Please let me know why the escape character does n't work for me? Any
help to resolve the problem is much appreciated.
Thanks
pad
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 21 Mar 2007 at 20:05, Dr.Ruud wrote:
> "Beginner" schreef:
>
> > The Iconv route hasn't been too successful either. I tried
> > Text::Iconv->new('ISO8859-1','utf8');
> > Thinking that my data is currently ISO8859-1but the results were not
> > as I had hoped. Where I had MICROSCÓPIO, I got MIC
"Beginner" schreef:
> The Iconv route hasn't been too successful either. I tried
> Text::Iconv->new('ISO8859-1','utf8');
>
> Thinking that my data is currently ISO8859-1but the results were not
> as I had hoped. Where I had MICROSCÓPIO, I got MICROSCÃPIO.
I don't think you are showing all charact
On 3/21/07, Beginner <[EMAIL PROTECTED]> wrote:
s/\xc9/''.$1.';'/ # Hoping for É from É
Your pattern didn't include parentheses, so there's no $1. Do you want
something like this, maybe?
s!([^\x20-\x7e])! '' . ord($1) . ';' !ge;
Or you could just use HTML::Entities
On 20 Mar 2007 at 12:55, Chas Owens wrote:
> On 3/20/07, Beginner <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have a large, 1.3GB xml file that I was trying to validate. It
> > turns out that the file has a lot of exotic characters in it such as:
> > é
> > è
> > Ä
> > È
> > ...etc
> > Being a la
On 3/20/07, Beginner <[EMAIL PROTECTED]> wrote:
Hi,
I have a large, 1.3GB xml file that I was trying to validate. It
turns out that the file has a lot of exotic characters in it such as:
é
è
Ä
È
...etc
The area of encoding and internationalisation is one I have no
experience of at all and from
You can get the hex values from http://ascii-table.com/img/table-apple.gif
You can escape them with \xdd where dd is the 0xdd hex value.
eg
s/[\x80-\xFF]/\?/
On 3/20/07, Beginner <[EMAIL PROTECTED]> wrote:
Hi,
I have a large, 1.3GB xml file that I was trying to validate. It
turns out that the
Hi,
I have a large, 1.3GB xml file that I was trying to validate. It
turns out that the file has a lot of exotic characters in it such as:
é
è
Ä
È
...etc
The area of encoding and internationalisation is one I have no
experience of at all and from what I've heard it is rather complex
and difficult
Thanks raymond . it's working now.
Regards
Irfan Sayed
"Raymond Raj" <[EMAIL PROTECTED]>
04/06/2006 11:23 AM
Please respond to
<[EMAIL PROTECTED]>
To
Irfan J Sayed/India/[EMAIL PROTECTED],
cc
Subject
RE: perl help : escape character
> -Origina
> -Original Message-
> From: Irfan J Sayed [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 06, 2006 11:29 AM
> To: beginners@perl.org
> Subject: perl help : escape character
>
>
> Hi All,
>
> I am running following clearcase command
>
> my @acti
.
I think this error is something related to escape character .
Please let me know how to handle such situation.
Regards
Irfan Sayed
On Mon, 28 Feb 2005 10:05:32 -0500, Wiggins d'Anconia
<[EMAIL PROTECTED]> wrote:
> Joe Mecklin wrote:
> > ok, per the instructions, binmode only converts CR LF to \n, which is
> > not what i'm looking for.
> >
>
> Out of curiousity isn't the escap
Joe Mecklin wrote:
ok, per the instructions, binmode only converts CR LF to \n, which is
not what i'm looking for.
Out of curiousity isn't the escape character used for client side
handling? In this case why would you need to worry about the escape
character, as you can drop to a sub
{
my ($prematch, $match) = $t->waitfor(String => "login:", Errmode =>
'return');
print "$prematch $match\n\n";
print "\nchanging \"escape\" character";
print "\n";
$t->put("^]");
CTED]>
> Date: Friday, February 25, 2005 8:44 am
> Subject: redefining Net::Telnet "escape" character
>
> > i sent this to the comp.lang.perl.modules newsgroup as the
> > documentation suggests and got no response at all, so i thought i'd
> > see if
Joe,
Try turning binmod on. If it fails post some code and a bit more od a
description of what you are trying to do.
hth,
Mark G.
- Original Message -
From: Joe Mecklin <[EMAIL PROTECTED]>
Date: Friday, February 25, 2005 8:44 am
Subject: redefining Net::Telnet "escape"
ified this
for sure yet because i had my "epiphany" just as i was leaving work
for the day, and i've been forced to take the rest of the week off for
personal reasons).
question: what is one/the way to redefine the net::telnet escape
character from ^] to another ^[ (or anything else?)
28 matches
Mail list logo