![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Perl Question | serm | Shell Programming and Scripting | 2 | 09-28-2006 05:50 AM |
| perl question | BG_JrAdmin | Shell Programming and Scripting | 1 | 09-09-2005 07:46 PM |
| Perl Question | Gary Dunn | Shell Programming and Scripting | 2 | 12-03-2004 12:37 PM |
| PERL question | frank | Shell Programming and Scripting | 1 | 06-18-2002 03:13 AM |
| Perl question | Jubba | Shell Programming and Scripting | 1 | 04-01-2002 02:24 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Perl question regarding [ ]
Below program, I do not get why item I am looking for is [6], instead of [5].
When I do $#text, i get the right value for $value1, but when I do [5], i get somsething4, instead of somsethingxxxxxxxxxxxxxxxxxxx(which is what I am looking for. when I do [0], I get empty.. why? what did I do wrong? can you please help? thanks. #!/usr/bin/perl my $value1; while(<>) { my $line = $_; (@text) = split(/\s+/,$line); if($line =~ /Time/) { #$value1 = $text[6]; $value1 = $text[$#text]; Top of the file below something somsething somsething something4 somethingxxxxxxxxxxxxx |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|