Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: wrong in minus

by Anonymous Monk
on May 10, 2018 at 16:54 UTC ( [id://1214340]=note: print w/replies, xml ) Need Help??


in reply to wrong in minus

I don't know what your data looks like (you should give us a sample), but making an assumption that you used split incorrectly, try this:

@tmp1=split /\t+/, $item1;

Replies are listed 'Best First'.
Re^2: wrong in minus
by Tux (Canon) on May 10, 2018 at 17:16 UTC

    And the use strict; use warnings; advice would have given you an indication:

    $ perl -wE'my $item1="x\t\ty";my@tmp1=split(/t+\,$item1/);' Use of uninitialized value $_ in split at -e line 1. $ perl -wE'my $item1="x\t\ty";my@tmp=split(/t+/,$item1);say for@tmp' x y $ perl -wE'my $item1="x\t\ty";my@tmp=split(/\t+/,$item1);say for@tmp' x y

    Enjoy, Have FUN! H.Merijn
Re^2: wrong in minus
by yueli711 (Sexton) on May 10, 2018 at 19:09 UTC

    Thank you so much! Yes! You are correct!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1214340]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (1)
As of 2024-04-25 00:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found