Re: search and replace

2012-08-16 Thread Gergely Buday
Here is the correct version: #!/usr/bin/perl $csproj_text = C:\\build.txt; $csproj_text =~ s/\\//g; print $csproj_text\n; Notice that in order to put a literal backslash into a perl string, you should escape it. In your original program, you have put a \b, a bell character into the string.

Re: Beginner question

2006-11-30 Thread Gergely Buday
I am new to perl and have a doubt. I have a script that needs to run a command. The command that is being run requires input from the user to proceed. Instead of prompting the user how can I code the utility to not prompt the user but take the input from a variable that has the value that is to

debugging question

2006-04-20 Thread Gergely Buday
Is there a way to debug concurrent perl programs, i.e. programs that use fork()? E.g. I would like to watch the main process. At a naive try I got strange error messages. - Gergely -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

pod2html

2006-01-03 Thread Gergely Buday
Hi there, I'm to use pod2html but I don't have administrator rights so would like to install it in my home directory. Is that possible? - G -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

readdir question

2005-09-30 Thread Gergely Buday
Hi, this is a working code snippet: opendir (DIR, $dir) || die Open failed: $!\n; $\ = \n; while ($_ = readdir(DIR)) { print; }; But when I try to use while (readdir(DIR)) ... my script writes only empty lines. It seems that the proper number of empty lines are written. Does the prepended $_

[:alpha:]

2005-09-09 Thread Gergely Buday
Hi there, why my regex does not work as I expect? I would like to match the lines consisting of only letters, at least one of them: #!/usr/bin/perl while (STDIN) { if (/^[:alpha:]+$/) { print; } } It seems that my perl (5.8.something) does not understand

%ENV

2005-09-08 Thread Gergely Buday
Hi there, why is the script #!/usr/bin/perl foreach $key (sort keys %ENV) { print $key=$ENV{$key}\n; } returns much less variable than $ set using bash? - Gergely -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

hash question

2005-09-06 Thread Gergely Buday
Hi there, do you have a clue why is this not working? The interpreter complains about a syntax error in line 7 near $myhash. #!/usr/bin/perl %myhash = { alma = apple, korte = pear }; foreach $ky (keys (%myhash)) { print $ky, : , $myhash($ky), \n; } -- To unsubscribe, e-mail: [EMAIL

Re: hash question

2005-09-06 Thread Gergely Buday
Thank you all for your answers. - Gergely -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response