Nishi Bhonsle wrote:
> Hi:
Hello,
> I have a string such as
> instance/bit/bitGroup/default/tz/l_cs
> where the last directory stands for os languages.
>
> I have to get the last directory and assign it to a var such as
> $mylang = l_cs, in the above example.
> How can i achieve that?
$ perl -l
"Nishi Bhonsle" schreef:
> I have a string such as
> instance/bit/bitGroup/default/tz/l_cs
> where the last directory stands for os languages.
>
> I have to get the last directory and assign it to a var such as
> $mylang = l_cs, in the above example.
> How can i achieve that?
my $s = q{instan
On 02/16/2007 07:25 PM, Jeff Pang wrote:
The command "perldoc -f open" shows you how to do get the output from a
command without starting a shell.
Do you mean open a pipe? It still need to fork a child process for running the
external commands.
Read the "safe pipe opens" section of "perld
>The command "perldoc -f open" shows you how to do get the output from a
>command without starting a shell.
>
Do you mean open a pipe? It still need to fork a child process for running the
external commands.
--
祝所有中华Perl用户新春快乐!
Happy New Year for all Chinese Perl guys!
--
To unsubscribe, e-ma
>
>I have a string such as
>instance/bit/bitGroup/default/tz/l_cs
>where the last directory stands for os languages.
>
>I have to get the last directory and assign it to a var such as
>$mylang = l_cs, in the above example.
>How can i achieve that?
>
Hello,
Here is one way to do it:
my ($mylang)
>
>Can someone suggest where I would look to reinvent "df" with perl? The "df"
>command enumerates all the drives and partitions and interrogates them for
>the amount of disk space total, used and available. Is there an OS neutral
>way to write this program? I hope so. If not, this will be running
Intrah onat Diria .. Fri, 16 Feb 2007 15:08:02 -0800
, "Nishi Bhonsle" wrote "Revera y":
> Thanks.
>
> How can i achieve that?
my $s = 'instance/bit/bitGroup/default/tz/l_cs';
$s =~ /.*\/(.*)$/;
print $1;
> $mylang = l_cs, in the above example.
> I have to get the last directory and
Hi:
I have a string such as
instance/bit/bitGroup/default/tz/l_cs
where the last directory stands for os languages.
I have to get the last directory and assign it to a var such as
$mylang = l_cs, in the above example.
How can i achieve that?
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
On 02/16/2007 07:58 AM, Doroshok Stanislav wrote:
hi all
I need output from system():
@rrd = ("/usr/bin/rrdtool","graph","-","--title","hypergraph",);
$rezult = system(@rrd);
how can i get output?
p.s. i don't wont use `` and run shell;
thanks
The command "perldoc -f open" show
On 02/16/2007 11:12 AM, siegfried wrote:
Can someone suggest where I would look to reinvent "df" with perl? The "df"
command enumerates all the drives and partitions and interrogates them for
the amount of disk space total, used and available. Is there an OS neutral
way to write this program? I h
Can someone suggest where I would look to reinvent "df" with perl? The "df"
command enumerates all the drives and partitions and interrogates them for
the amount of disk space total, used and available. Is there an OS neutral
way to write this program? I hope so. If not, this will be running on
xub
>p.s. i don't wont use `` and run shell;
Why don't ue ``? system() call would also fork a child process to do the
things,as `` do.
--
Jeff Pang
EMAIL: [EMAIL PROTECTED] AIM: jeffpang
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.
hi all
I need output from system():
@rrd = ("/usr/bin/rrdtool","graph","-","--title","hypergraph",);
$rezult = system(@rrd);
how can i get output?
p.s. i don't wont use `` and run shell;
thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
thanks
it looks well, but i tried to export them unsuccessfully.
>On Fri, 16 Feb 2007 12:52:50 +0100, cz172638 wrote:
>> use constant TESTERCONFIG => %testerscfg;
>>
>> foreach $b (keys %testerscfg) {
>> print $b."\n";
>> }
>>
>> it works well, but when i put in foreach loop instead of %tester
On Fri, 16 Feb 2007 12:52:50 +0100, cz172638 wrote:
> use constant TESTERCONFIG => %testerscfg;
>
> foreach $b (keys %testerscfg) {
> print $b."\n";
> }
>
> it works well, but when i put in foreach loop instead of %testerscfg
> TESTERCONFIG
> i got following:
>
> Type of arg 1 to keys must be
hi all,
i need setup constant hash generated from file, if it is possible.
i have following code:
my %testerscfg = ();
sub get_testerconfig {
open(TESTERCONFIG,"@{[TESTERCFG]}") or die "@{[TESTERCFG]} doesn't exists
or isn't readable!\n";
# loop while testers file contain a line
while (my
Hi Nitin,
2007/2/16, Nitin Aggarwal <[EMAIL PROTECTED]>:
Hi,
I am using bind variables for executing a select query which uses "in"
operator. Following is the prototype of my code:
$query = "select a from tab where b in (:1)";
@list = {"A","B","C","D"};
$list_values = join("','",@list);
$DBI->
hi all.
i've been programming in perl for a few years, but i'm definitely no
expert. the begginer's list seemed like the best place to ask for
help on this program/solution i'm working on, so here goes...
i am charged with the task of parsing a (basically) infinite set of
plain text files
Hi,
I am using bind variables for executing a select query which uses "in"
operator. Following is the prototype of my code:
$query = "select a from tab where b in (:1)";
@list = {"A","B","C","D"};
$list_values = join("','",@list);
$DBI-> connect (..);
$sth -> prepare($query);
$sth-> execute ($
19 matches
Mail list logo