10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm not sure why I'm having so much trouble with this.
I think I'm really not understanding how this works.
I'm trying to store a regex in a variable for use later in a script.
Can someone tell me why this doesn't match???
#!/usr/bin/perl
#
#
#
$ticket=1212;
my $rx_ticket =... (1 Reply)
Discussion started by: timj123
1 Replies
2. Shell Programming and Scripting
I am working on converting shell to Perl script. In shell we have built in function
trap
Do you know alternative in Perl or actually we don't need it?
Thanks for contribution (3 Replies)
Discussion started by: digioleg54
3 Replies
3. Shell Programming and Scripting
my @d =split('\|', $_);
west|ACH|3|Y|LuV|N||N||
Qt|UWST|57|Y|LSV|Y|Bng|N|KT|
It Returns d as 8 for First Line, and 9 as for Second Line . I want to Process Both the Files, How to Handle It. (3 Replies)
Discussion started by: vishwakar
3 Replies
4. Shell Programming and Scripting
am a beginer of shell Unix, plesase tell me how to get parameter with $perl in loop
$ perl -lne '$/="DOCEND";print $_."DOCEND" if /$ACC/' file_input > output
i can't get parameter in loop with perl fucntion like this
pass paramerter to $ACC not accept in this script
$ACC = paramerter to... (4 Replies)
Discussion started by: krai
4 Replies
5. Shell Programming and Scripting
Hi... I have a question regarding the split function in PERL.
I have a very huge csv file (more than 80 million records). I need to extract a particular position(eg : 50th position) of each line from the csv file. I tried using split function. But I realized split takes a very long time.
Also... (1 Reply)
Discussion started by: castle
1 Replies
6. Homework & Coursework Questions
Hi... I have a question regarding the split function in PERL.
I have a very huge csv file (more than 80 million records). I need to extract a particular position(eg : 50th position) of each line from the csv file. I tried using split function. But I realized split takes a very long time.
Also... (1 Reply)
Discussion started by: castle
1 Replies
7. UNIX for Dummies Questions & Answers
hi
i am not getting what exactly bless function do in perl explanation in perldoc is not very clear i tried to search on google but i am getting confused or rather not getting at all. can anybody explain in short what it does in following example as well as in general ?
sub new {
my... (1 Reply)
Discussion started by: zedex
1 Replies
8. Shell Programming and Scripting
Hi,
here is my perl script.This script creates an array and is sorting it using the in-built sort function in perl.
#!/usr/local/bin/perl
my number=6;
my @num_arr=(1,2,3,4,5);
my @array=(23,"$number","Hello",2.345,@num_arr);
#printing the array
print... (2 Replies)
Discussion started by: DILEEP410
2 Replies
9. Shell Programming and Scripting
$mystring = "name:blk:house::";
print "$mystring\n";
@s_format = split(/:/, $mystring);
for ($i=0; $i <= $#s_format; $i++) {
print "index is $i,field is $s_format";
print "\n";
}
$size = $#s_format + 1;
print "total size of array is $size\n";
i am expecting my size to be 5, why is it... (5 Replies)
Discussion started by: new2ss
5 Replies
10. Programming
If i "new" a object of class type A and A uses some data structure like array, set, map etc.
When i delete this object, need I delete/clear the array/set/map in the destrucator of A, or system will deallocate the memory automatically??
Thanks in advance! Em, do bear me if the question is... (3 Replies)
Discussion started by: zzz_zzz
3 Replies