Hi all,
Chas. Owens wrote:
Well, I would suggest taking this to the Perl Porters list*, this is a
list for people who are starting to learn Perl. You could also write
a module implementing you algorithm either in pure Perl or in XS**
(the interface between ISO C and Perl) and upload it to CPAN
On Sat, Feb 7, 2009 at 22:41, Marion McCoskey wrote:
> I am a retired programmer, and I haven't had a lot of trouble with the
> couple of thousand lines of Perl I have written, except remembering to
> always put in curly braces. But I don't know anything about the Perl
> community.
>
> While look
Hi Marion,
Marion McCoskey wrote:
While looking at the documentation for the sort function, I noticed it
complaining about the shortcomings of the quick sort. I share that
feeling and I have developed a single-buffered count sort that is
faster than the quick sort and a lot more stable.
Act
I am a retired programmer, and I haven't had a lot of trouble with the
couple of thousand lines of Perl I have written, except remembering to
always put in curly braces. But I don't know anything about the Perl
community.
While looking at the documentation for the sort function, I noticed it
comp
On Sat, Feb 7, 2009 at 19:11, Gunnar Hjalmarsson wrote:
> Chas. Owens wrote:
>>
>> On Sat, Feb 7, 2009 at 16:09, Gunnar Hjalmarsson
>> wrote:
>>>
>>> Chas. Owens wrote:
This isn't a job for a regex; it is a job for split:
>>>
>>> whose first argument is a regex pattern... ;-)
>>
>> snip
On Sat, Feb 7, 2009 at 19:21, Rob Dixon wrote:
snip
> $record =~ s|,(..)/(..)/(),|,$3$1$2,| or die "Data problem";
snip
Yes, but how would you handle it if this weren't the second field? It
is better to have a general solution.
--
Chas. Owens
wonkden.net
The most important skill a program
Chas. Owens wrote:
> On Sat, Feb 7, 2009 at 08:45, Soham Das wrote:
>> Hi All,
>>
>> I am a noob in Perl and hence would like some help to what I am sure is a
>> very easy problem.
>>
>> I have got a text file in csv format
>> The format is:
>> ,,,
>>
>> Now my objective is to change the for
Chas. Owens wrote:
On Sat, Feb 7, 2009 at 16:09, Gunnar Hjalmarsson wrote:
Chas. Owens wrote:
This isn't a job for a regex; it is a job for split:
whose first argument is a regex pattern... ;-)
snip
Yes and a regex follows in the substitute, but the whole things isn't
being done with a rege
On Sat, Feb 7, 2009 at 16:09, Gunnar Hjalmarsson wrote:
> Chas. Owens wrote:
>>
>> This isn't a job for a regex; it is a job for split:
>
> whose first argument is a regex pattern... ;-)
snip
Yes and a regex follows in the substitute, but the whole things isn't
being done with a regex. Trying to
Chas. Owens wrote:
This isn't a job for a regex; it is a job for split:
whose first argument is a regex pattern... ;-)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...
> Hello,
>
> I try to write the name of the current directory in $x:
>
> $x = system ("pwd");
>
> But it doesn't work. It also doesn't work in all these combinations:

> $x = 'system("pwd")';
> $x = system("`pwd`");
>
> Can You help me to write the result of 'pwd' in $x?
Where is 'pwd'?
- Original Message
From: pouliakhina
To: beginners@perl.org
Sent: Saturday, February 7, 2009 8:59:56 AM
Subject: bash in perl
Hello,
I try to write the name of the current directory in $x:
$x = system ("pwd");
But it doesn't work. It also doesn't work in all these combinations:
$x =
On Sat, Feb 7, 2009 at 08:59, pouliakhina wrote:
> Hello,
>
> I try to write the name of the current directory in $x:
>
> $x = system ("pwd");
>
> But it doesn't work. It also doesn't work in all these combinations:
>
> $x = 'system("pwd")';
> $x = system("`pwd`");
>
> Can You help me to write
On Sat, Feb 7, 2009 at 08:45, Soham Das wrote:
> Hi All,
>
> I am a noob in Perl and hence would like some help to what I am sure is a
> very easy problem.
>
> I have got a text file in csv format
> The format is:
> ,,,
>
> Now my objective is to change the format of the date, and rename the
Hello,
I try to write the name of the current directory in $x:
$x = system ("pwd");
But it doesn't work. It also doesn't work in all these combinations:
$x = 'system("pwd")';
$x = system("`pwd`");
Can You help me to write the result of 'pwd' in $x?
Thank You,
Irina
--
To unsubscribe, e
On Sat, Feb 7, 2009 at 07:10, John W. Krahn wrote:
> Rob Dixon wrote:
>>
>> Greg wrote:
>>>
>>> I have an input file that I have to evaluate whether to include lines
>>> based upon their last character.
>>> Is there a simple regex that would allow me to
>>> assign the very last character to a vari
Hi All,
I am a noob in Perl and hence would like some help to what I am sure is a very
easy problem.
I have got a text file in csv format
The format is:
,,,
Now my objective is to change the format of the date, and rename the whole file
as a .csv
So, my strategy is:
I want to read the co
On Fri, Feb 6, 2009 at 13:27, jk wrote:
> i m a beginner to perl . i want to write a perl program to Connect to
> an FTP server and get or put files and also to Automate the one-time
> transfer of many files to download the file everyday, which have
> changed since yesterday. i have written the fi
On Feb 5, 6:09 pm, jwkr...@shaw.ca (John W. Krahn) wrote:
> stuforman wrote:
> > i want to use perl to end each line with a '~'. i would really
> > appreciate any syntax that would help me do this...
>
> $line =~ s/$/~/;
>
> John
> --
> Those people who think they know everything are a great
> anno
On Sat, Feb 7, 2009 at 07:17, Chas. Owens wrote:
> On Fri, Feb 6, 2009 at 14:31, Ice Man wrote:
>> Ok . so I have to start a program which is written in java.
>>
>> #!/local/bin/perl
>>
>> my $command = "/aa/bb/c/executable \&";
>> my $ret = 0;
>>
>> $ret = `$command`;
>>
>> exit $ret;
>>
>>
On Fri, Feb 6, 2009 at 14:31, Ice Man wrote:
> Ok . so I have to start a program which is written in java.
>
> #!/local/bin/perl
>
> my $command = "/aa/bb/c/executable \&";
> my $ret = 0;
>
> $ret = `$command`;
>
> exit $ret;
>
> The normal behavior of this executable is to list some informati
Rob Dixon wrote:
Greg wrote:
I have an input file that I have to evaluate whether to include lines
based upon their last character.
Is there a simple regex that would allow me to
assign the very last character to a variable?
^^^
^^^
Greg wrote:
I have an input file that I have to evaluate whether to include lines
based upon their last character.
Is there a simple regex that would allow me to assign the very last
character to a variable?
In my case it will either be A or I (capital i) if that helps?
/([AI])\z/ and my $vari
itshardtogetone wrote:
> How do I print the % sign when using printf.
RTFM. See for example: perldoc -f printf, which should point you to the
sprintf doc.
It is even the first mentioned conversion there.
The doc is on a thingy called "the web" too:
http://perldoc.perl.org/functions/sprintf.html
Jim wrote:
>
> How do I match a line ending in
> ,@@)
> using a regular expression?
my $line = "1234567890,@@)\n";
if ($line =~ m/,@@\)$/) {
print "OK\n";
}
HTH,
Rob
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://lea
Greg wrote:
>
> I have an input file that I have to evaluate whether to include lines
> based upon their last character.
> Is there a simple regex that would allow me to assign the very last
> character to a variable?
>
> In my case it will either be A or I (capital i) if that helps?
>
> Thanks v
ok . trying this again.
Seems my first post did not take so I will try again.
I need to start a java program. So in perl, I have created a command
like:
my $command = "executable \&";
my $ret = `$command`;
exit $ret;
This program does not return but rather hangs. If I try this in linux
fr
How do I match a line ending in
,@@)
using a regular expression?
Thank you
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
i m a beginner to perl . i want to write a perl program to Connect to
an FTP server and get or put files and also to Automate the one-time
transfer of many files to download the file everyday, which have
changed since yesterday. i have written the first part of the program
i.e.connect,get and put f
Ok . so I have to start a program which is written in java.
#!/local/bin/perl
my $command = "/aa/bb/c/executable \&";
my $ret = 0;
$ret = `$command`;
exit $ret;
The normal behavior of this executable is to list some information but
it never returns you to a prompt. You have to hit the ret
I have an input file that I have to evaluate whether to include lines
based upon their last character.
Is there a simple regex that would allow me to assign the very last
character to a variable?
In my case it will either be A or I (capital i) if that helps?
Thanks very much from a perl newb.
-G
31 matches
Mail list logo